Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2016
    Posts
    19

    Answered: inserting multiple rows in bulk

    Hello,

    I'm wondering if there's an SQL statement for inserting multiple rows of data in bulk.

    Currently, I'm doing this:

    INSERT INTO [dbo].[BowtieDMEquipmentLookup] ([EquipmentDescription]) VALUES ('Absorption Column')
    INSERT INTO [dbo].[BowtieDMEquipmentLookup] ([EquipmentDescription]) VALUES ('Accumulator')
    INSERT INTO [dbo].[BowtieDMEquipmentLookup] ([EquipmentDescription]) VALUES ('Adsorption Column')
    INSERT INTO [dbo].[BowtieDMEquipmentLookup] ([EquipmentDescription]) VALUES ('Air Cooler')
    INSERT INTO [dbo].[BowtieDMEquipmentLookup] ([EquipmentDescription]) VALUES ('Air Handling Unit')
    INSERT INTO [dbo].[BowtieDMEquipmentLookup] ([EquipmentDescription]) VALUES ('Air Receiver')
    .
    .
    .

    It's just one column.

    Is there something like this in the SQL language:

    MULTI_INSERT INTO [dbo].[BowtieDMEquipmentLookup] ([EquipmentDescription]) MULTI_VALUES ('Absorption Column', 'Accumulator', 'Adsorption Column', 'Air Cooler', 'Air Handling Unit', 'Air Receiver')

    I don't know how something like this would work for more than one column, but maybe there is something.

    Thanks.

  2. Best Answer
    Posted by MCrowley

    "
    Code:
    INSERT INTO [dbo].[BowtieDMEquipmentLookup] ([EquipmentDescription]) 
    VALUES ('Absorption Column'),
       ('Accumulator'),
       ('Adsorption Column'),
       ('Air Cooler'),
       ('Air Handling Unit'),
       ('Air Receiver')
    "


  3. #2
    Join Date
    Jan 2003
    Location
    Massachusetts
    Posts
    5,858
    Provided Answers: 17
    Code:
    INSERT INTO [dbo].[BowtieDMEquipmentLookup] ([EquipmentDescription]) 
    VALUES ('Absorption Column'),
       ('Accumulator'),
       ('Adsorption Column'),
       ('Air Cooler'),
       ('Air Handling Unit'),
       ('Air Receiver')

  4. #3
    Join Date
    Dec 2016
    Posts
    19
    Cool, didn't know you could do that.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •