Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

error using asp.net2 variable in query for asp.net2 web app

$
0
0

Hi using this query with asp.net2 web app and getting the error

select * from openquery(GHWPRD, 'select isnull(first_given_name,'') as first_name, isnull(surname,'') as surname, isnull(home_phone,'') as phone, isnull(address1,'') as street, isnull(address4,'')  as city from ORACARE.K_CPIREG  where pt_code = '" & snhi & "' and death_date is null ')
Msg 102, Level 15, State 1, Line 1
Incorrect syntax near ' & snhi & '.


Viewing all articles
Browse latest Browse all 23857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>