Quantcast
Channel: Answers for "Subquery return more than 1 value, Msg 512"
Browsing latest articles
Browse All 8 View Live

Answer by Rob Farley

The problem is with the assignment queries down the end.What do you want to be put into Cards.Quantity when there are multiple rows inserted?Try turning that INSERT statement into one that uses SELECT...

View Article



Answer by Kev Riley

Also if you rewrote the last bit without the local variables, it might be more clearer that you could be inserting dupe rows (I don't know whether you meant to do that or not....)Insert into...

View Article

Answer by Matt Whitfield

I like both Rob's and Kev's answer and have voted them up, but one thing they haven't actually said is that the inserted and deleted tables can contain multiple rows. You don't have your trigger fire...

View Article

Answer by Mohamed

Dear Matt Whitfield , first Thanks for your help , I mean that if I Insert more than record in one insert statement into purchases table, the trigger will fire , then it will check the records, if it's...

View Article
Browsing latest articles
Browse All 8 View Live




Latest Images