MSSql Query solution cum Suggestion Required
- by Nirmal
Hello All...
I have a following scenario in my MSSql 2005 database.
zipcodes table has following fields and value (just a sample):
zipcode latitude longitude
------- -------- ---------
65201 123.456 456.789
65203 126.546 444.444
and "place" table has following fields and value :
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
Now, my requirement is like I want to compare my zip codes of "place" table and update the available latitude and longitude fields from "zipcode" table.
And there are some of the zipcodes which has no entry in "zipcode" table, so that should remain null.
And the major issue is like I have more then 50,00,000 records in my db. So, query should support this feature.
I have tried some of the solutions but unfortunately not getting proper output.
Any help would be appreciated...