Notices
Computer & Technology Related Post here for help and discussion of computing and related technology. Internet, TVs, phones, consoles, computers, tablets and any other gadgets.

Help with SQL query, (please)

Thread Tools
 
Search this Thread
 
Old Jan 23, 2003 | 09:12 AM
  #1  
rik1471's Avatar
rik1471
Thread Starter
Scooby Regular
 
Joined: Nov 2001
Posts: 4,788
Likes: 0
Question

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
Reply
Old Jan 23, 2003 | 09:15 AM
  #2  
rik1471's Avatar
rik1471
Thread Starter
Scooby Regular
 
Joined: Nov 2001
Posts: 4,788
Likes: 0
Post

Sorted. The second 'WHERE' was the problem
Reply
Related Topics
Thread
Thread Starter
Forum
Replies
Last Post
ALEXSTI
General Technical
5
Sep 28, 2015 09:29 PM
Ozne
General Technical
2
Sep 27, 2015 03:06 PM
stevem2k
Non Scooby Related
8
Jul 6, 2011 11:11 PM
Mkhan
Non Scooby Related
14
Aug 9, 2001 02:07 AM
SDB
Non Scooby Related
2
May 26, 2001 11:55 PM




All times are GMT +1. The time now is 12:20 PM.