After some scrambling on the web, the below SQL Functions seem to work for me to convert Easting/Northing values (on the Australian GDA94, Zone 56 standard). The key to get it to work is setting the correct datum details in the constant section. A quick test of this function does seem to give me the correct Lat/Long coordinates of Sydney Habour Bridge:
A sample point from latlong.net |
Testing the functions |
The two pieces of T-SQL codes below are the same, the only difference is one returns Latitude, the other one returns Longitude value
Hi Viet, as I am not a power user of SQL how do i use this?
ReplyDeleteI have a table SERVICEADDRESS that contains the fileds SERVICEADDRESS.LATITUDEY and SERVICEADDRESS.LONGITUDEX
which are in gda94 Easting and Northing