September 21, 2016 at 11:19 pm
Comments posted to this topic are about the item Complex foreign key
September 22, 2016 at 2:13 am
Took me a while to work this out, as I thought the lower-case l for the first column was a number 1. Would have been better with different column names!
After this it was clear that master would be created, so it was just a question of working out the only combination of 3 other options that weren't mutually contradictory.
September 22, 2016 at 3:12 am
When I posted the qotd, all names were lower case. I don't know who capitalized them.
My instance of sqlserver has the binary collation.
September 22, 2016 at 5:26 am
I suppose giving the full message rather than "etc" would have given it away.
September 22, 2016 at 6:36 am
An interesting QotD, but it was necessary to proceed slowly and cautiously to find the right answers...:hehe:
Thanks Carlo for thoughtfully prepared question and good references.
September 22, 2016 at 6:56 am
I got the responses correct except that I also included "Command(s) completed successfully." -- which does flash briefly due to the master table creating successfully (doing them individually shows that as well).
Oh well....
LinkedIn: https://www.linkedin.com/in/sqlrv
Website: https://www.sqlrv.com
September 22, 2016 at 7:03 am
Aaron N. Cutshall (9/22/2016)
I got the responses correct except that I also included "Command(s) completed successfully." -- which does flash briefly due to the master table creating successfully (doing them individually shows that as well).Oh well....
The batch is only one! "Command(s) completed successfully." appears only if the entire batch runs without errors.
September 22, 2016 at 7:41 am
Good interesting question.
I rather dislike SQL Server's lumping together of multiple cascade paths and cascade cycles; it shouldn't be forcing us to use triggers in all cases where there can be multiple cascade paths. I'm perfectly happy for it to refuse to handle cascade cycles because I think a that it's potentially possible to obtain different results according to what order updates and/or deletions take place, but I would prefer to see it hadling multiple cycle-free cascade in cases where it's easy to detect (from the metadata) that different resuts can't be produced by different operation orders (as in the example in this case).
Tom
September 22, 2016 at 7:59 am
Carlo Romagnano (9/22/2016)
Aaron N. Cutshall (9/22/2016)
I got the responses correct except that I also included "Command(s) completed successfully." -- which does flash briefly due to the master table creating successfully (doing them individually shows that as well).Oh well....
The batch is only one! "Command(s) completed successfully." appears only if the entire batch runs without errors.
Good point. Since batch is what was mentioned in the QotD, that's what I should rely on. And, upon further reflection, I think the message I saw flash was simply that the table was created.
LinkedIn: https://www.linkedin.com/in/sqlrv
Website: https://www.sqlrv.com
September 22, 2016 at 9:31 am
Really interesting question. Thanks, Carlo!
September 22, 2016 at 10:05 am
Aaron N. Cutshall,
I agree with you.
I have not received the incorrect syntax message, anyway I gocheck syntax with button parse and received the message Command(s) completed successfully.
😀
September 22, 2016 at 10:11 am
Carlo Romagnano (9/22/2016)
When I posted the qotd, all names were lower case. I don't know who capitalized them.My instance of sqlserver has the binary collation.
We reformat code to highlight keywords.
September 22, 2016 at 10:48 am
I knew the answer but for the life of me I couldn't figure out why I needed to choose 4 answers. For some reason my brain did not understand that all the answers were about logical problems but one was about syntax. Good question but the one answer really threw me off.
_______________________________________________________________
Need help? Help us help you.
Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.
Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.
Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/
September 22, 2016 at 11:24 pm
This was removed by the editor as SPAM
September 23, 2016 at 12:23 am
Good question, but a small nit-pick:
"The syntax of the batch is correct" is not really an output of the batch, but the conclusion of the parser. That message doesn't appear anywhere.
Viewing 15 posts - 1 through 15 (of 18 total)
You must be logged in to reply to this topic. Login to reply