Assigning a variable to "LIKE" condition search string

pikachew

Registered User.
Local time
Tomorrow, 01:15
Joined
Jan 26, 2005
Messages
34
Hi can anyone help me with this query?

'SQLTable "Resolutions Per Year", "SELECT ResName, COUNT(ResName) AS Total FROM Stats LEFT JOIN Resolutions ON (Stats.UserID = Resolutions.UserID AND Stats.ResID=Resolutions.ResID) WHERE Stats.UserId = '"&login&"' AND Date LIKE '%sYear%' GROUP BY Stats.UserID, ResName ORDER BY COUNT(ResName) DESC"

sYear is a variable
example sYear = 2003,2004,2005....

This does not work.
Is there anyway to assign the search string to be a variable?
 
Didn't you post this in the Genral forum?
 
Sorry will restrict to General from now onwards
 

Users who are viewing this thread

Back
Top Bottom