Survey Forums

HomeHomeSurvey Project ...Survey Project ...Using Survey & ...Using Survey & ...Could I put session variable in Sql based answer types? Could I put session variable in Sql based answer types?
Previous
 
Next
New Post
1/18/2016 8:59 AM
 

When I add answer type and using sql query for data source , I couldn't put session variable in WHERE clause in sql query.

I try this:

select customerid, customername from tbcustomer where country = @@country@@

But no use.

How could I solve the problem?

 
New Post
1/22/2016 12:44 PM
 

Hello,

The solution is to use quotation marks on the session variable (country is a textfield):

select customerid, customername from vts_tbcustomer where country = '@@country@@'

Also make sure to use the correct table name: vts_tbcustomer


 
Previous
 
Next
HomeHomeSurvey Project ...Survey Project ...Using Survey & ...Using Survey & ...Could I put session variable in Sql based answer types? Could I put session variable in Sql based answer types?