2
我在我的SQL Server 2005數據庫中有以下情形。SQL Server查詢解決方案暨建議需要
zipcodes
表有以下字段和值(只是一個示例):
zipcode latitude longitude
------- -------- ---------
65201 123.456 456.789
65203 126.546 444.444
和place
表有以下字段和值:
id name zip latitude longitude
-- ---- --- -------- ---------
1 abc 65201 NULL NULL
2 def 65202 NULL NULL
3 ghi 65203 NULL NULL
4 jkl 65204 NULL NULL
現在,我的要求是像我想比較我的郵政編碼爲place
表格,並從zipcode
表中更新可用的經緯度字段。
還有一些zipcodes
它沒有在zipcode
表中輸入,所以應該保持爲空。
而且主要問題是像我有更多然後50,00,000記錄在我的分貝。所以,查詢應該支持這個功能。
我已經嘗試了一些解決方案,但遺憾的是沒有得到正確的輸出。
任何幫助,將不勝感激......
嘿,謝謝@astander ...它適用於我.... – Nirmal 2010-03-27 12:08:17