[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1850
  • Last Modified:

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
0
Lucia
Asked:
Lucia
1 Solution
 
chapmandewCommented:
Are you sure you posted your actual query?
0
 
BrandonGalderisiCommented:
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
 
LuciaAuthor 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

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now