Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8088

passing string variable to select query not working

$
0
0

Friends,

 

PB 7.0

DB: sql server 2008

 

string mid;

mid=get_user();

messagebox("test",mid);

 

 

above message box is showing the value of mid correctly...

but when i pass this variable to the below query i am not getting the value.

where i am making mistake....? please check the red colored text and correct me...my issue is only with the variable not with the query...

 

s4 = 'insert into student select RollNumber, FirstName,CSubjectCode, ' & 

         + 'Internal_1,Mentor  ' &

    + 'FROM Marks_Final ' &

   + 'WHERE (Internal_1 is not null)  and ' &

    + '(feeactive="Y") and mentor="+mid+" ' &

+ 'GROUP BY RollNumber'

 

thanks


Viewing all articles
Browse latest Browse all 8088

Trending Articles



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