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 ««1234»»»

T-SQL Syntax Expand / Collapse
Author
Message
Posted Friday, August 17, 2012 3:31 AM


SSC-Addicted

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

Group: General Forum Members
Last Login: Friday, January 31, 2014 2:56 AM
Points: 483, Visits: 256
Only took a shot at this one (and missed). Today I don't have the time to search the documentation, but mostly because this was IMHO a bit to complex question.
Post #1346423
Posted Friday, August 17, 2012 4:01 AM
SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Today @ 4:43 AM
Points: 1,855, Visits: 2,965
Guessed & got it right - although I only answered so I could see the actual answer!
Like the question for making me think about it, the right/wrong was irrelevant really.
Would definitely like to see it expanded to an article if possible.

Cheers
Post #1346446
Posted Friday, August 17, 2012 4:11 AM


Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Today @ 5:47 AM
Points: 3,855, Visits: 4,994
This was quite rough for a Friday question.
Inclined to agree with Hugo's opinion, though must add my well done to Jack for taking the time to investigate and submit the question. All things considered, I learned something out of it and the ensuing discussion.


____________________________________________
Space, the final frontier? not any more...
All limits henceforth are self-imposed.
“libera tute vulgaris ex”
Post #1346449
Posted Friday, August 17, 2012 5:32 AM


Say Hey Kid

Say Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey Kid

Group: General Forum Members
Last Login: Thursday, June 12, 2014 4:19 AM
Points: 701, Visits: 1,145
I agree. Not a good QotD. This should bring lots of discussion though and is very educational.
Post #1346483
Posted Friday, August 17, 2012 6:39 AM


Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Friday, May 30, 2014 8:23 AM
Points: 336, Visits: 388
Good Question - When in doubt, the answer is always 'C' :)
Post #1346509
Posted Friday, August 17, 2012 6:53 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Today @ 7:40 AM
Points: 1,277, Visits: 2,198
Ouch, this one made my brain hurt.
Impossible to answer, but it did make me think.
Post #1346514
Posted Friday, August 17, 2012 7:12 AM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Friday, July 11, 2014 1:37 AM
Points: 2,550, Visits: 1,613
I agree with Hugo. I thought of a couple of ways this could be done in my head before answering first, but didn't bother trying to research any other ways.. took an educated stab at an answer, but guessed wrongly. Knowing the answer now doesn't really serve me much use either going forward. Fair play to the author though for coming up with this and their research; it's just one that I won't remember for too long :)
Post #1346524
Posted Friday, August 17, 2012 7:16 AM


SSC-Insane

SSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-Insane

Group: General Forum Members
Last Login: Yesterday @ 4:59 PM
Points: 23,000, Visits: 31,482
It was a thinking question. I never even counted how many ways a variable could be set to a value. Having to leave out the basic SET (I don't count SET in the UPDATE statement the same way as it is required) and SELECT statements, how many ways are there? Yes, you could count some multiple times, but if you think about it, it's still the same (a duplicate, if you will).




Lynn Pettis

For better assistance in answering your questions, click here
For tips to get better help with Performance Problems, click here
For Running Totals and its variations, click here or when working with partitioned tables
For more about Tally Tables, click here
For more about Cross Tabs and Pivots, click here and here
Managing Transaction Logs

SQL Musings from the Desert Fountain Valley SQL (My Mirror Blog)
Post #1346530
Posted Friday, August 17, 2012 8:16 AM


Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Today @ 6:13 AM
Points: 3,002, Visits: 3,178
Koen Verbeeck (8/17/2012)
Great question, but way too difficult for a Friday


+1

Kept on coming back to it through the day - still got it wrong!


-------------------------------
Posting Data Etiquette - Jeff Moden
Smart way to ask a question

There are naive questions, tedious questions, ill-phrased questions, questions put after inadequate self-criticism. But every question is a cry to understand (the world). There is no such thing as a dumb question. ― Carl Sagan
I would never join a club that would allow me as a member - Groucho Marx
Post #1346567
Posted Friday, August 17, 2012 8:37 AM
Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Yesterday @ 4:13 PM
Points: 3,786, Visits: 1,083
Good question, didn't have the time to investigate in BOL, so I took a guess and got it right.

Happy weekend everyone!!


"El" Jerry.

"A watt of Ottawa" - Gerardo Galvan
Post #1346581
« Prev Topic | Next Topic »

Add to briefcase ««1234»»»

Permissions Expand / Collapse