Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Multiple Inserts


Multiple Inserts

Author
Message
EL Jerry
EL Jerry
Hall of Fame
Hall of Fame (3.9K reputation)Hall of Fame (3.9K reputation)Hall of Fame (3.9K reputation)Hall of Fame (3.9K reputation)Hall of Fame (3.9K reputation)Hall of Fame (3.9K reputation)Hall of Fame (3.9K reputation)Hall of Fame (3.9K reputation)

Group: General Forum Members
Points: 3914 Visits: 1337
I agree with cengland0 about portability. You never know where your code will end up running, even if it is a secured ("closed"?) environment. As a former Tech Support Analyst, we got several headaches when new versions of SQL Server were released because of code deprecation and incompatibility, so I wave the "As Standard As Possible" flag.

Cheers,

"El" Jerry.

"A watt of Ottawa" - Gerardo Galvan

To better understand your help request, please follow these best practices.
OzYbOi d(-_-)b
OzYbOi d(-_-)b
Ten Centuries
Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)

Group: General Forum Members
Points: 1300 Visits: 778
tks Steve.
Thomas Abraham
Thomas Abraham
SSCrazy
SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)

Group: General Forum Members
Points: 2329 Visits: 2254
Toreador (1/17/2012)
Hugo Kornelis (1/17/2012)
A good question, and it's hard to see how anbody could contest the correct answer.


How long before someone complains that the correct answer is an error message saying there's no such table as my table ;-)


Not me, but about those column names ... certainly it's not good design practice to use such generic column names. Hehe

Please don't go. The drones need you. They look up to you.
Connect to me on LinkedIn
Paul White
Paul White
SSChampion
SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)

Group: General Forum Members
Points: 10338 Visits: 11350
Hugo Kornelis (1/17/2012)
EDIT: Removed the color tag after a few failed attempts to use it - I hope just using bold text emphasises the changes sufficiently.

Like this...? (the stupid trick here is to put double-quotes around the hex colour value *and* the leading # sign. Awesome.)

HugoHugoHugoHugoHugoHugo
HugoHugoHugoHugoHugoHugo
HugoHugoHugoHugoHugoHugo
HugoHugoHugoHugoHugoHugo
HugoHugoHugoHugoHugoHugo
HugoHugoHugoHugoHugoHugo
HugoHugoHugoHugoHugoHugo
HugoHugoHugoHugoHugoHugo
HugoHugoHugoHugoHugoHugo
HugoHugoHugoHugoHugoHugo
HugoHugoHugoHugoHugoHugo
HugoHugoHugoHugoHugoHugo
HugoHugoHugoHugoHugoHugo
HugoHugoHugoHugoHugoHugo
HugoHugoHugoHugoHugoHugo
HugoHugoHugoHugoHugoHugo
HugoHugoHugoHugoHugoHugo
HugoHugoHugoHugoHugoHugo
HugoHugoHugoHugoHugoHugo
HugoHugoHugoHugoHugoHugo
HugoHugoHugoHugoHugoHugo
HugoHugoHugoHugoHugoHugo
HugoHugoHugoHugoHugoHugo
HugoHugoHugoHugoHugoHugo
HugoHugoHugoHugoHugoHugo
HugoHugoHugoHugoHugoHugo
HugoHugoHugoHugoHugoHugo
HugoHugoHugoHugoHugoHugo
HugoHugoHugoHugoHugoHugo
HugoHugoHugoHugoHugoHugo
HugoHugoHugoHugoHugoHugo
HugoHugoHugoHugoHugoHugo
HugoHugoHugoHugoHugoHugo
HugoHugoHugoHugoHugoHugo
HugoHugoHugoHugoHugoHugo
HugoHugoHugoHugoHugoHugo



Paul White
SQLPerformance.com
SQLblog.com
@SQL_Kiwi
Hugo Kornelis
Hugo Kornelis
SSCrazy Eights
SSCrazy Eights (8.3K reputation)SSCrazy Eights (8.3K reputation)SSCrazy Eights (8.3K reputation)SSCrazy Eights (8.3K reputation)SSCrazy Eights (8.3K reputation)SSCrazy Eights (8.3K reputation)SSCrazy Eights (8.3K reputation)SSCrazy Eights (8.3K reputation)

Group: General Forum Members
Points: 8297 Visits: 11538
SQL Kiwi (1/17/2012)
Like this...? (the stupid trick here is to put double-quotes around the hex colour value *and* the leading # sign. Awesome.)

Thanks, Paul. I missed the double-quotes.
I have now edited my post to show the missing bits in red.


Hugo Kornelis, SQL Server MVP
Visit my SQL Server blog: http://sqlblog.com/blogs/hugo_kornelis
tilew-948340
tilew-948340
SSChasing Mays
SSChasing Mays (629 reputation)SSChasing Mays (629 reputation)SSChasing Mays (629 reputation)SSChasing Mays (629 reputation)SSChasing Mays (629 reputation)SSChasing Mays (629 reputation)SSChasing Mays (629 reputation)SSChasing Mays (629 reputation)

Group: General Forum Members
Points: 629 Visits: 2437
I was so sure I knew the right answers that I would have bet on it! Good thing I did not as I got it wrong Blush
I have the excuse that I never had to put many rows with only one query (use application reading excel files and for loop), so never had to search to do it.

So much to learn, but this one, I know how to do it now

Thanks!
AMOLDAROTE
AMOLDAROTE
Forum Newbie
Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)

Group: General Forum Members
Points: 3 Visits: 26
INSERT TABLE1 (COL1,COL2) VALUES ('A', 'AA'), ('B','BB'),('C','CC')
Danny Ocean
Danny Ocean
Ten Centuries
Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)

Group: General Forum Members
Points: 1342 Visits: 1549
Easy and straight-forward question.
Thank you.

Thanks
Vinay Kumar
-----------------------------------------------------------------
Keep Learning - Keep Growing !!!
www.GrowWithSql.com
Jagadish Kumar Punnapu
Jagadish Kumar Punnapu
SSC-Enthusiastic
SSC-Enthusiastic (143 reputation)SSC-Enthusiastic (143 reputation)SSC-Enthusiastic (143 reputation)SSC-Enthusiastic (143 reputation)SSC-Enthusiastic (143 reputation)SSC-Enthusiastic (143 reputation)SSC-Enthusiastic (143 reputation)SSC-Enthusiastic (143 reputation)

Group: General Forum Members
Points: 143 Visits: 111
Good question... Thanks...
Koen Verbeeck
Koen Verbeeck
SSCoach
SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)

Group: General Forum Members
Points: 16366 Visits: 13199
Woot woot easy one :-D



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 SQLKover.

MCSA SQL Server 2012 - MCSE Business Intelligence
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search