I am trying to migrate from postgres to sql-server(windows). But I have no idea of ms-sql syntax and documentation is also doing me no good. I have a table 'geocodes' storing latitude and longitude data in decimal format. And I have an migration for indexing the lat, long data using postgis
create index index_on_geocodes_location ON geocodes using gist (st_geographyfromtext(((('POINT('::text || longitude) || ' '::text) || latitude) || ')'::text))
I am having a hard time generating a equivalent query for sql-server. According to the documents its pretty easy if the column datatype is geography, but since I already have an existing database with decimal datatype this wont help.
PS: I am using rails migration to execute the queries