September 7, 2012 at 5:38 pm
This is a good one - ending the week on a high note. Thanks, Kenneth!
September 8, 2012 at 7:59 pm
Good question, thanks Kenneth.
September 9, 2012 at 2:04 pm
Richard Warr (9/7/2012)
I looked at the first option and was disappointed that the second one wasn'tCollect $200 for parsing GO.
😀
Loved the question BTW. No catch, just expected behavior.
Best regards,
Andre Guerreiro Neto
Database Analyst
http://www.softplan.com.br
MCITPx1/MCTSx2/MCSE/MCSA
September 10, 2012 at 9:17 am
good question, caught me out!
September 12, 2012 at 5:38 pm
The benefit of replying a few days later and fully caffeinated. 😀
Even so, I almost missed the INSERT ... SELECT part. :hehe:
Fun question, and yes, a helpful technique for populating tables with large amounts of test data.
September 18, 2012 at 12:40 am
Damn!
Got the go part right, but didn't read the select closely enough.
But good to remember this way to create an exponentially rising number of records in a hurry.
Thank you for the question.
September 18, 2012 at 5:38 am
Great question thanks.
:exclamation: "Be brave. Take risks. Nothing can substitute experience." :exclamation:
September 29, 2012 at 1:36 pm
Nice that you can't "GO" in a T-SQL statement. What a nightmare that would be for anyone trying to avoid SQL Injection issues.
Jamie
February 6, 2015 at 8:47 am
Sorry, but i got this error:
Server: Msg 170, Level 15, State 1, Line 3
Line 3: Incorrect syntax near '5'.
I`m using Query Analyzer :crazy:
February 6, 2015 at 9:21 am
lcajui (2/6/2015)
Sorry, but i got this error:Server: Msg 170, Level 15, State 1, Line 3
Line 3: Incorrect syntax near '5'.
I`m using Query Analyzer :crazy:
Notice this question is nearly 3 years old. When you don't offer anything other than "I got an error" it doesn't really help much in the discussion. Are you really using Query Analyzer...as in sql 2000??? IIRC that didn't work in 2000.
_______________________________________________________________
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/
Viewing 10 posts - 31 through 39 (of 39 total)
You must be logged in to reply to this topic. Login to reply