By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
439,971 Members | 1,451 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 439,971 IT Pros & Developers. It's quick & easy.

Simple update query is making me lose my mind...

P: 3
I feel so stupid for posting this but I cannot figure out why I'm getting an error with this simple update query.

Expand|Select|Wrap|Line Numbers
  1. update [spa work order pgsql]
  2. set [scan_closing] = '02/14/06 06:00:00 AM'
  3. where [scan_closing] = '02/14/20 06:00:00 AM'
Gives me the following error:

Server: Msg 512, Level 16, State 1, Procedure HIFL3253_SO_15155, Line 1
Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression.
The statement has been terminated.

And that's it. I cannot grok that error message BECAUSE THERE'S NO SUB QUERY. I can see no reason why this should error out. Thanks in advance to anyone who points out whatever simple thing I've missed.
Oct 20 '06 #1
Share this Question
Share on Google+
3 Replies

P: 1
Check your update triggers.
Oct 20 '06 #2

P: 3
Check your update triggers.
Thank you kind sir. There was a trigger in there I didn't know about. It just didn't occur to me to look at those.
Oct 20 '06 #3

P: 3

I'm in the process of doing a lot of clean up work on the db.
When I first got here there were 117 triggers on the main table that ran everytime ANY entry was updated. Performance killer would be a kind way to put it. Those triggers came from an ASP page that actually PRODUCED a trigger for a dealer that sent an email when their product shipped. I dealt with those triggers and ASP pages and got it down to 3 triggers for the table. Anyway, you've just alerted me to ANOTHER page that was doing the same thing, just not with the same frequency so it escaped my attention because I thought I'd finished with that horrible mess.

Thanks again. Knew it was something simple I was missing.
Oct 20 '06 #4

Post your reply

Sign in to post your reply or Sign up for a free account.