Need to pass value to a variable in SQL Query
I am writing a script and I have all the SQL queries placed in one file and each query is identified by a unique variable. I have function to execute the SQL query, which executes and returns the recordset. I have some queries where some parameter needs to be passed into the sql query, so that the query returns the expected values.
Qry1="select empname from employee where job="&title&" and rownum>2"
The function is present in vbs file as given below:-
public function excquery(query)
In the script
resset---is defined as recordset
The script is failing while executing the script with the error missing expression.(ora00936).
Can you help me in this regard?
Re: Need to pass value to a variable in SQL Query
Qry1="select empname from employee where job='"&title&"' and rownum>2"