Please start any new threads on our new site at We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Select query question
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Starting Member

1 Posts

Posted - 10/25/2012 :  17:02:57  Show Profile  Reply with Quote

I'm trying to tune a basic query, but I am receiving a "Encountered unexpedted token "?"" error message. An example of the query is :

Select * from table a where a.column IN (?,?,?,?,?)
Select * from table a where a.column=?

Would you please explain me what does that "?" do? So I could find a solution for my error.

Thank you in advance for your cooperation.

Very Important crosS Applying yaK Herder

52326 Posts

Posted - 10/25/2012 :  17:08:00  Show Profile  Reply with Quote
soiunds like you're using this query inside execute sql task or oledb command in SSIS.
'?' is placeholder for parameters. you need to map appropriate parameters in parameter mapping tab against place holders

SQL Server MVP

Go to Top of Page

Flowing Fount of Yak Knowledge

United Kingdom
3385 Posts

Posted - 10/26/2012 :  05:58:17  Show Profile  Visit nigelrivett's Homepage  Reply with Quote

Cursors are useful if you don't know sql.
SSIS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.04 seconds. Powered By: Snitz Forums 2000