So I am trying to convert some stuff from MySql to MSSQL 2012 the problem is I dont know Sql that well to know what is wrong with this statement. I get a response when this is ran against the MySql DB with the same information as the MSSQL DB has.
I am getting the error :
Incorrect syntax near the keyword 'where'. Msg: 156, Level: 15, State: 1, Procedure: , Line: 11
select distinct
coalesce(s.state_prov, ls.state_prov, 'State Unknown') as state_prov
from
circuit_id_locations cid
join
location_states ls
left join
location_states s
on
cid.state_prov = s.abreviation
where
ls.idx = '99'
or
cid.id = '99'