Log in
::
Register
::
Not logged in
Home
Tags
Articles
Editorials
Stairways
Forums
Scripts
Videos
Blogs
QotD
Books
Ask SSC
SQL Jobs
Training
Authors
About us
Contact us
Newsletters
Write for us
Recent Posts
Recent Posts
Popular Topics
Popular Topics
Home
Search
Members
Calendar
Who's On
Home
»
Article Discussions
»
Article Discussions by Author
»
Discuss content posted by bitbucket
»
Temporary Objects 2
38 posts, Page 1 of 4
1
2
3
4
»
»»
Temporary Objects 2
Rate Topic
Display Mode
Topic Options
Author
Message
bitbucket-25253
bitbucket-25253
Posted Thursday, March 08, 2012 8:56 PM
SSCertifiable
Group: General Forum Members
Last Login: Today @ 5:16 PM
Points: 5,101,
Visits: 20,201
Comments posted to this topic are about the item
Temporary Objects 2
If everything seems to be going well, you have obviously overlooked something.
Ron
Please help us, help you -before posting a question please
read
Before posting a performance problem please
read
Post #1264094
baabhu
baabhu
Posted Thursday, March 08, 2012 8:59 PM
Ten Centuries
Group: General Forum Members
Last Login: Today @ 1:58 AM
Points: 1,112,
Visits: 970
Hi Bitbucket,
The link you provide is not correct.
http://www.sqlservercentral.com/questions/UNION/88678/http://www.sqlservercentral.com/Forums/Topic1205649-1222-2.aspx
And there is a typo in the question.
SELECT Id,,ProductionDate FROM Foobar
Initially I was confused whether it has to do anything with the question itself.
Anyways finally managed to get it right.
Post #1264096
bitbucket-25253
bitbucket-25253
Posted Thursday, March 08, 2012 9:28 PM
SSCertifiable
Group: General Forum Members
Last Login: Today @ 5:16 PM
Points: 5,101,
Visits: 20,201
Once again I looked at my notes and here is the link
Posted 11/15/2011 1:34 PM
http://www.sqlservercentral.com/Forums/Topic1205649-1222-2.aspx
Mr Hugo Kornelis comment is
in my display mode is at the bottom of page 2 of the forum
The title of the forum is Table variable - 2
If everything seems to be going well, you have obviously overlooked something.
Ron
Please help us, help you -before posting a question please
read
Before posting a performance problem please
read
Post #1264106
bitbucket-25253
bitbucket-25253
Posted Thursday, March 08, 2012 9:29 PM
SSCertifiable
Group: General Forum Members
Last Login: Today @ 5:16 PM
Points: 5,101,
Visits: 20,201
Once again I looked at my notes and here is the link
Posted 11/15/2011 1:34 PM
http://www.sqlservercentral.com/Forums/Topic1205649-1222-2.aspx
Mr Hugo Kornelis comment is
in my display mode is at the bottom of page 2 of the forum
The title of the forum is Table variable - 2
If everything seems to be going well, you have obviously overlooked something.
Ron
Please help us, help you -before posting a question please
read
Before posting a performance problem please
read
Post #1264107
monkeyloafer
monkeyloafer
Posted Friday, March 09, 2012 12:29 AM
Old Hand
Group: General Forum Members
Last Login: Wednesday, April 24, 2013 7:44 AM
Points: 361,
Visits: 130
The answer is I think incorrect:
SELECT Id,,ProductionDate FROM Foobar
- if you assume this is not a typo then both first and second users will receive an error message - I demand a recount!
Post #1264156
Koen Verbeeck
Koen Verbeeck
Posted Friday, March 09, 2012 12:40 AM
SSCrazy Eights
Group: General Forum Members
Last Login: Today @ 2:14 PM
Points: 9,370,
Visits: 6,468
The real answer is: the proc cannot be created because of the flagrant syntax violation.
How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?
Member of
LinkedIn
. My blog at
LessThanDot
.
MCSA SQL Server 2012 - MCSE Business Intelligence
Post #1264162
Hugo Kornelis
Hugo Kornelis
Posted Friday, March 09, 2012 1:05 AM
SSCertifiable
Group: General Forum Members
Last Login: Today @ 4:30 PM
Points: 5,235,
Visits: 7,038
I am embarassed to admit that I got this question, that apparently was based on my comments, wrong.
I should have been warned. I even checked the code several times. All because I thought that if both programs run without error (as I assumed), there would have been THREE correct answers. So I checked. And checked again.
I did contemplate the extra comma, but figured that this would not be Ron's style, so it had to be a genuine type (hint: test all code before submitting QotD!)
I did also contemplate the inconsistent use of upper- and lowercase, but figure that wouldn't be Ron's style either (hint: test all code on a database with case-sensitive collation)
And after reading the script yet another time, I ticked the first three options - and then kicked myself for overlooking the named constraint.
Thanks, Ron! Good question (though unfortunately hampered by the typo and the inconsistent upper-/lowercase).
Hugo Kornelis, SQL Server MVP
Visit my SQL Server blog:
http://sqlblog.com/blogs/hugo_kornelis
Post #1264167
Keld Laursen (VFL)
Keld Laursen (VFL)
Posted Friday, March 09, 2012 1:43 AM
SSC Veteran
Group: General Forum Members
Last Login: Thursday, April 11, 2013 5:56 AM
Points: 245,
Visits: 147
Well, I didn't catch the error on the select from Foobar, but just thought about locking while selecting/inserting.
I didn't really look into the temp table as this should be local to the procedure, but the constraint eluded my reading abilities. I have on other occations been bitten by ghe "named sometning" in a procedure, so I should be warned.
Anyway, the "select any two correct" should have hinted at the correct answer. If we disregard deadlocks between concurrent runs, then instance #2 should always wait for instance #1, så if it were possible to complete #2 at all, it should. And as others have pointed out: If both completed, you would have 3 check marks.
Post #1264182
call.copse
call.copse
Posted Friday, March 09, 2012 3:03 AM
Ten Centuries
Group: General Forum Members
Last Login: Today @ 2:26 AM
Points: 1,084,
Visits: 690
That one took me about 20 minutes of careful thought to get what the problem was - I knew there had to be one somewhere (besides the obvious typo). Useful to be aware of the issue.
Post #1264201
Toreador
Toreador
Posted Friday, March 09, 2012 3:46 AM
Ten Centuries
Group: General Forum Members
Last Login: Friday, May 17, 2013 9:52 AM
Points: 1,356,
Visits: 4,761
Got this right as I was hit by it a few weeks ago after an attempt to "tidy up" some code by naming the constraints
Post #1264220
« Prev Topic
|
Next Topic »
38 posts, Page 1 of 4
1
2
3
4
»
»»
Permissions
You
cannot
post new topics.
You
cannot
post topic replies.
You
cannot
post new polls.
You
cannot
post replies to polls.
You
cannot
edit your own topics.
You
cannot
delete your own topics.
You
cannot
edit other topics.
You
cannot
delete other topics.
You
cannot
edit your own posts.
You
cannot
edit other posts.
You
cannot
delete your own posts.
You
cannot
delete other posts.
You
cannot
post events.
You
cannot
edit your own events.
You
cannot
edit other events.
You
cannot
delete your own events.
You
cannot
delete other events.
You
cannot
send private messages.
You
cannot
send emails.
You
may
read topics.
You
cannot
rate topics.
You
cannot
vote within polls.
You
cannot
upload attachments.
You
may
download attachments.
You
cannot
post HTML code.
You
cannot
edit HTML code.
You
cannot
post IFCode.
You
cannot
post JavaScript.
You
cannot
post EmotIcons.
You
cannot
post or upload images.
Copyright © 2002-2013 Simple Talk Publishing. All Rights Reserved.
Privacy Policy.
Terms of Use.
Report Abuse.