> I need to pass some varibles into a LIKE clause in a SELECT statement.
> I am having trouble with the format.
>
> AND valuedesc LIKE '[EMAIL PROTECTED]@year%' is what I was doing and know this
> is wrong cause it see that garb as a literal string. How do I pass
> this so the vars
show?

Eric,

I recently ran into this same problem recently.  The correct way to do this is:
AND valuedesc LIKE '%'[EMAIL PROTECTED]'%'[EMAIL PROTECTED]'%'

You need to put the "+" signs in and remember to put the single quotes properly.  Whenever you use variables, you have to build the statement as a string.

Hope this helps,
Ali
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to