SQL Clone
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 (4K reputation)Hall of Fame (4K reputation)Hall of Fame (4K reputation)Hall of Fame (4K reputation)Hall of Fame (4K reputation)Hall of Fame (4K reputation)Hall of Fame (4K reputation)Hall of Fame (4K reputation)

Group: General Forum Members
Points: 3990 Visits: 1345
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.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)

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

Group: General Forum Members
Points: 2761 Visits: 2255
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
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: 16056 Visits: 11355
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
SSChampion
SSChampion (11K reputation)SSChampion (11K reputation)SSChampion (11K reputation)SSChampion (11K reputation)SSChampion (11K reputation)SSChampion (11K reputation)SSChampion (11K reputation)SSChampion (11K reputation)

Group: General Forum Members
Points: 11142 Visits: 12004
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
Right there with Babe
Right there with Babe (763 reputation)Right there with Babe (763 reputation)Right there with Babe (763 reputation)Right there with Babe (763 reputation)Right there with Babe (763 reputation)Right there with Babe (763 reputation)Right there with Babe (763 reputation)Right there with Babe (763 reputation)

Group: General Forum Members
Points: 763 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
SSCommitted
SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)

Group: General Forum Members
Points: 1644 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 (182 reputation)SSC-Enthusiastic (182 reputation)SSC-Enthusiastic (182 reputation)SSC-Enthusiastic (182 reputation)SSC-Enthusiastic (182 reputation)SSC-Enthusiastic (182 reputation)SSC-Enthusiastic (182 reputation)SSC-Enthusiastic (182 reputation)

Group: General Forum Members
Points: 182 Visits: 117
Good question... Thanks...
Koen Verbeeck
Koen Verbeeck
One Orange Chip
One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)

Group: General Forum Members
Points: 27729 Visits: 13268
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?
My blog at SQLKover.

MCSE Business Intelligence - Microsoft Data Platform MVP
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