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

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 delete

Author  Topic 

arkiboys
Master Smack Fu Yak Hacker

1433 Posts

Posted - 2012-01-17 : 11:45:25
How can this query be fixed please?
Thanks

delete from tblMain where ID = 1 and
operator = 'NOT IN' and value = '('EUR', 'JPY')'

error is : Incorrect syntax near 'EUR'.

Lamprey
Master Smack Fu Yak Hacker

4614 Posts

Posted - 2012-01-17 : 11:51:11
[code]delete from tblMain where ID = 1 and
operator = 'NOT IN' and value IN ('EUR', 'JPY')
[/code]That's just a guess. If that is not right try explaining what you are trying to do in words.
Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 2012-01-17 : 12:11:34
I Get a sense that they want to use dynamic sql

Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx


Want to help yourself?

http://msdn.microsoft.com/en-us/library/ms130214.aspx

http://weblogs.sqlteam.com/brettk/

http://brettkaiser.blogspot.com/


Go to Top of Page
   

- Advertisement -