How to use DELETE command in SQL SERVER 2005

Hi,

I would like to do the following:
DELETE FROM PS_NCSR6200
WHERE STRM IN ('1092')

I get the following error:
Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression.

This was not an issue in the previous version of sql server.

I have tried to do what is in the help files but nothing is working.  

Any assistance would be greatly appreciated,

Lucy
BrockAsked:
Who is Participating?
 
BrandonGalderisiConnect With a Mentor Commented:
Perhaps you are doing:

DELETE FROM PS_NCSR6200
WHERE STRM =('1092')

and '1092' is populated by building a dynamic Query string and in some cases it build a query like this.

DELETE FROM PS_NCSR6200 WHERE STRM =('1092', '1024')
^^ THIS will NOT work.  But I can assure you that what you posted is valid SQL.

0
 
chapmandewCommented:
Are you sure you posted your actual query?
0
 
BrockAuthor Commented:
Ok,  I found out what the issue is.  The table had a trigger and that is why I was having problems perrfoming the command.

Thanks to both for your quick response.

Lucy
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.