SQL Variable

IanT

Registered User.
Local time
Today, 20:27
Joined
Nov 30, 2001
Messages
191
Hi

I am trying to use a = symbol as a variable in some SQL code.

Current code:

((tblData.[LINE OF BUSINESS]) = '" & strLOB & "')

Updated code:

((tblData.[LINE OF BUSINESS]) '" & strSymbol & "' '" & strLOB & "')

Can not get it to work, any ideas!
 
What are you trying to do? The current code looked fine, except you need to put a closing double quote on the end. Perhaps add a .Value to StrLOB
 
You would not want the symbol surrounded by single quotes. That would evaluate to:

WHERE ((tblData.[LINE OF BUSINESS]) '=' 'whatever')

which isn't valid SQL.
 

Users who are viewing this thread

Back
Top Bottom