November 19, 2015 at 10:50 pm
Comments posted to this topic are about the item Committing Work
November 19, 2015 at 10:58 pm
This was removed by the editor as SPAM
November 19, 2015 at 11:51 pm
Good question, thank you
...
November 20, 2015 at 12:23 am
Learned something new. Thanks Steve!
Need an answer? No, you need a question
My blog at https://sqlkover.com.
MCSE Business Intelligence - Microsoft Data Platform MVP
November 20, 2015 at 1:06 am
Koen Verbeeck (11/20/2015)
Learned something new. Thanks Steve!
That's true
🙂
November 20, 2015 at 2:13 am
Thought this looked too simple, but I guess Steve likes to make it easy on a Friday...
November 20, 2015 at 4:58 am
I knew that WORK keyword is optional, but it seemed too easy,
thanks Steve.
November 20, 2015 at 5:11 am
I never heard of WORK before, so I learned something new today. That's always a good way to end the week. Thanks.
November 20, 2015 at 6:47 am
Of course the correct answer is it throws an error, because nobody has a table named 'MyTable'. And if they do, the 'test' column is a GUID. :hehe:
November 20, 2015 at 7:39 am
It actually should work with previous versions as well. Documentation for SQL Server 2000 includes it, but I couldn't test on anything older than 2008R2.
https://technet.microsoft.com/en-us/library/aa258231(v=sql.80).aspx
It's weird that this is so old yet so unknown.
November 20, 2015 at 8:37 am
Interesting that this doesn't work
BEGIN TRANSACTION;
UPDATE
MyTable
SET
test = 9;
COMMIT WORK2
GO
But this does
BEGIN TRANSACTION;
UPDATE
MyTable
SET
test = 9;
COMMIT TRANSACTION WORK2
GO
I got it right not knowing about WORK but assuming they were the same.
November 20, 2015 at 8:53 am
Xavon (11/20/2015)
Of course the correct answer is it throws an error, because nobody has a table named 'MyTable'. And if they do, the 'test' column is a GUID. :hehe:
Ha, I have so many MyTable's that I'm constantly having to guess higher and higher numbers to add to the end.
November 20, 2015 at 9:15 am
Steve Jones - SSC Editor (11/20/2015)
Xavon (11/20/2015)
Of course the correct answer is it throws an error, because nobody has a table named 'MyTable'. And if they do, the 'test' column is a GUID. :hehe:Ha, I have so many MyTable's that I'm constantly having to guess higher and higher numbers to add to the end.
Heh - Have you heard of a scratch database that gets rebuilt every so often? Or Tempdb, perhaps? 😉
November 20, 2015 at 4:04 pm
Thank for this easy question foreseeing the week-end.
November 21, 2015 at 2:30 pm
Ed Wagner (11/20/2015)
Heh - Have you heard of a scratch database that gets rebuilt every so often? Or Tempdb, perhaps? 😉
This is in my Sandbox database. Nothing there needs to stay, but I sometimes start testing something and it might live for a few days, so don't want tempdb.
I just start creating a Mytable99 and if it works, all good.
Viewing 15 posts - 1 through 15 (of 19 total)
You must be logged in to reply to this topic. Login to reply