Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

to many parsed variable

Status
Not open for further replies.

nicktan

Programmer
Dec 9, 2002
3
0
0
AU
This is my current script, I know it is not right, but I don't know how to correct it. Please help. THANKS

@list_source = "a,b,c,d"

Set MyConn=Server.CreateObject("ADODB.Connection")
MyConn.Open "DBNAME", "sa", ""
SQL = "Select * From CUSTOMER where src in " & @list_source & ";"
Set RS = MyConn.Execute(SQL)
 
If you are not sure about a SQL query you should try it in the database itself. Then you know that at least your query is correct.
Try the following query:
Select * From CUSTOMER where src in (a,b,c,d)
With ( and without ;

Greets
 
You need parentheses

@list_source = "(a,b,c,d)"
-----------------------------------------------------------------
[pc] Be nice. It's only doing what you tell it to do.
mikewolf@tst-us.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top