Help with SQL query, (please)
Can someone tell me what's wrong with this query? I'm a beginner when it comes to SQL, so please be kind 
SqlJunk = "SELECT * FROM results WHERE " & strVar & " = '" & strQuery & "' AND WHERE id = '" & id & "' ORDER BY record"
I'm getting the error message: Error Type:
Microsoft OLE DB Provider for SQL Server (0x80040E14)
Incorrect syntax near the keyword 'WHERE'.
/new_cit/risk/edit2/searchquery.asp, line 31

SqlJunk = "SELECT * FROM results WHERE " & strVar & " = '" & strQuery & "' AND WHERE id = '" & id & "' ORDER BY record"
I'm getting the error message: Error Type:
Microsoft OLE DB Provider for SQL Server (0x80040E14)
Incorrect syntax near the keyword 'WHERE'.
/new_cit/risk/edit2/searchquery.asp, line 31
Thread
Thread Starter
Forum
Replies
Last Post
Mkhan
Non Scooby Related
14
Aug 9, 2001 02:07 AM



