Greetings All,
I have an SQL call that I would like to execute in my script. It works fine in the SQL Manager, but PowerBuilder is not happy about it.
PowerBuilder did not like the Declare statement, so I tried moving 'POINT' into the select statement. But I am having trouble figuring out how to escape it.
Not sure if this should be in a stored procedure or if there is some way to embed this in a data window?
Thanks in advance for any help!!
Best, Paul
DECLARE @me geography = 'POINT (13.8 51.3833 4326)';
SELECT TOP(1) country_code, city, latitude, longitude, geography.STDistance(@me) AS distance_meters
FROM city_centers
ORDER BY distance_meters
...or...
SELECT TOP(1) country_code, city, latitude, longitude, geography.STDistance('Point(:place_longitude :place_latitude 4326)') AS distance