AnsweredAssumed Answered

can one use a variable reference in an ODBC based SQL WHERE statement

Question asked by dataroo on Feb 18, 2015

Title

can one use a variable reference in an ODBC based SQL WHERE statement

Post

Hello

The following SQL statement gets a record from a MS SLQ server dB:

select name, surname from UserTable WHERE name = 'John'

Can one use a set variable : set variable = $tName = 'John'

and then use the following SQL query:

select name, surname from UserTable WHERE name = '$tName '

or some similar code to retrieve ODBC based data, for example, using a scanner to scan in the variable.

Thank you.

Outcomes