Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase ««12

T-SQL - What is the output of the statement Expand / Collapse
Author
Message
Posted Wednesday, June 17, 2009 7:46 AM


SSCrazy Eights

SSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy Eights

Group: General Forum Members
Last Login: Friday, October 17, 2014 8:13 AM
Points: 9,926, Visits: 11,188
Ray Laubert (6/17/2009)
Thanks for catching it and letting me know.

No worries. The answer was still clearly discernible from the information given.




Paul White
SQL Server MVP
SQLblog.com
@SQL_Kiwi
Post #736557
Posted Wednesday, June 17, 2009 1:01 PM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Wednesday, January 29, 2014 2:58 PM
Points: 1,141, Visits: 944
Nice question!!!
Post #736902
Posted Wednesday, June 17, 2009 2:48 PM


SSCrazy Eights

SSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy Eights

Group: General Forum Members
Last Login: Friday, October 17, 2014 8:13 AM
Points: 9,926, Visits: 11,188
crussell (6/17/2009)
I tested it on an existing test database table and immediately got an error because I had a trigger on the table. Using a table without a trigger gave me the kind of results intended.

There also can't be any CHECK constaints on the table, and it can't be either end of a FOREIGN KEY relationship.

Paul




Paul White
SQL Server MVP
SQLblog.com
@SQL_Kiwi
Post #736991
Posted Tuesday, October 6, 2009 4:39 AM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Tuesday, October 21, 2014 7:40 AM
Points: 54, Visits: 109
That is an incredibly useful bit of code.
Thank You
Post #798414
Posted Tuesday, October 6, 2009 8:12 AM


UDP Broadcaster

UDP BroadcasterUDP BroadcasterUDP BroadcasterUDP BroadcasterUDP BroadcasterUDP BroadcasterUDP BroadcasterUDP Broadcaster

Group: General Forum Members
Last Login: Today @ 10:14 AM
Points: 1,452, Visits: 8,253

I didn't even get a chance to read the question and it says I got it right. Read ahead buffer acting up????




Alvin Ramard
Memphis PASS Chapter

All my SSC forum answers come with a money back guarantee. If you didn't like the answer then I'll gladly refund what you paid for it.
Post #798537
Posted Tuesday, October 6, 2009 9:58 AM
Right there with Babe

Right there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with Babe

Group: General Forum Members
Last Login: Wednesday, October 8, 2014 9:11 AM
Points: 719, Visits: 695
Mine too.

I did get a new computer yesterday, but even with all the 'greatest OS ever', I'm pretty sure Win7 can't read my mind
Post #798650
Posted Tuesday, October 6, 2009 10:55 AM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Wednesday, January 29, 2014 2:58 PM
Points: 1,141, Visits: 944
Not only did I go the quetion right, I also had a note in the discussion. How about that?

This without logging in to the site.
Post #798679
Posted Tuesday, October 6, 2009 11:08 AM
Right there with Babe

Right there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with Babe

Group: General Forum Members
Last Login: Wednesday, October 8, 2014 9:11 AM
Points: 719, Visits: 695
SA-1 (10/6/2009)
Not only did I go the quetion right, I also had a note in the discussion. How about that?

This without logging in to the site.


Posted in June none the less.
Post #798687
Posted Tuesday, October 6, 2009 11:14 AM


UDP Broadcaster

UDP BroadcasterUDP BroadcasterUDP BroadcasterUDP BroadcasterUDP BroadcasterUDP BroadcasterUDP BroadcasterUDP Broadcaster

Group: General Forum Members
Last Login: Today @ 10:14 AM
Points: 1,452, Visits: 8,253
Dan Guzman (10/6/2009)
SA-1 (10/6/2009)
Not only did I go the quetion right, I also had a note in the discussion. How about that?

This without logging in to the site.


Posted in June none the less.


aaaaaahhhh .... that explains why it was already answered.




Alvin Ramard
Memphis PASS Chapter

All my SSC forum answers come with a money back guarantee. If you didn't like the answer then I'll gladly refund what you paid for it.
Post #798689
Posted Tuesday, October 6, 2009 7:54 PM


SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: Yesterday @ 5:47 AM
Points: 476, Visits: 879
Good question, I'm just disappointed that
OUTPUT inserted.column

returns values that have updated existing values.

And
OUTPUT Deleted.column

returns the existing values that were updates.

I suppose its more info that just which rows were updated. There's probably been a lot of thought gone into this that I am not giving MS credit for.
Post #798897
« Prev Topic | Next Topic »

Add to briefcase ««12

Permissions Expand / Collapse