SQL Server 2005 query uses ? which doesn't work in SQL Server 2012 -


i'm working on application queries live data on sql server. user enters name within '% %' marks search. ie. if user search owner of property such noble, enter %noble%.

we upgraded both application , sql server stores data sql server 2005 sql server 2012.

the existing query , new query identical:

select aurtvalm.pcl_num  aurtvalm  inner join rtpostal on aurtvalm.ass_num = rtpostal.ass_num rtpostal.fmt_nm2 ? 

in old version, above query produces 16 results. exact same query in 2012 version produces error:

incorrect syntax near '?'

has use of ? symbol changed since sql server 2005?

that because have incorrect syntax. have use parameter instead of question mark. like:

select aurtvalm.pcl_num   aurtvalm  inner join rtpostal on aurtvalm.ass_num = rtpostal.ass_num  rtpostal.fmt_nm2 @param 

Comments

Popular posts from this blog

javascript - Chart.js (Radar Chart) different scaleLineColor for each scaleLine -

apache - Error with PHP mail(): Multiple or malformed newlines found in additional_header -

java - Android – MapFragment overlay button shadow, just like MyLocation button -