Insert data into table

I'm drawing a blank and need some help.  I need to populate the t_custom_ask_amounts table with data from a spreadsheet.  I think there is a much easier way besides an insert script one row at a time.  I just can't remember what I did last season to populate the table.  Can someone give me a quick and easy way to get my spreadsheet data into the table???

Teresa

  • Former Member
    Former Member $organization

    Hi Teresa

    What I would do is:

    1. Use the Import Data tool in SQLS Management Studio to import your spreadsheet into a local table. ( I actually have a "staging" db set up to hold temp import data like this, to try to keep impresario a bit tidier)
    2. use the INSERT INTO / SELECT syntax to copy from the temp table into t_custom_ask_amounts, like this:
    INSERT INTO impresario.dbo. t_custom_ask_amounts ([customer_no],[season_no],[type],[amount])
           SELECT [customer_no],[season_no],[type],[amount])
           FROM staging.dbo.LT_teresas _import_table
    or something like that
    Ken
    
    
  • Ken,

    This is great, thanks a bunch. I'm going to give it a try first thing in the
    morning.

    Teresa


    -----Original Message-----
    From: Tessitura Technical Forum on behalf of Ken McSwain
    Sent: Wed 12/1/2010 6:40 PM
    To: Teresa Dean
    Subject: Re: [Tessitura Technical Forum] Insert data into table

    Hi Teresa

    What I would do is:

    1.Use the Import Data tool in SQLS Management Studio to import your
    spreadsheet into a local table. ( I actually have a "staging" db set up to
    hold temp import data like this, to try to keep impresario a bit tidier)
    2.use the INSERT INTO / SELECT syntax to copy from the temp table into
    t_custom_ask_amounts, like this:

    INSERT INTO impresario.dbo. t_custom_ask_amounts
    ([customer_no],[season_no],[type],[amount])
    SELECT [customer_no],[season_no],[type],[amount])
    FROM staging.dbo.LT_teresas _import_table
    or something like that
    Ken

    From: Teresa Dean
    Sent: 12/1/2010 6:13:40 PM


    I'm drawing a blank and need some help. I need to populate the
    t_custom_ask_amounts table with data from a spreadsheet. I think there is a
    much easier way besides an insert script one row at a time. I just can't
    remember what I did last season to populate the table. Can someone give me a
    quick and easy way to get my spreadsheet data into the table???

    Teresa




    This message was sent automatically to you by www.tessituranetwork.com
    because you subscribed to the Tessitura Technical Forum. You may reply to
    this message to post to the Technical forum or visit the site to search, read
    and post to the forums. In the interest of keeping the forum posts from
    becoming cluttered, we encourage you to delete previous message text from
    your reply before sending. Thank you!
  • Ken,

     

    Thanks so much for this….once I figured out that I needed to remove the few manual entries I had already done, this worked perfectly.  This was a huge time saver!!!

     

    Teresa

     

    From: Tessitura Technical Forum [mailto:forums-technical@tessituranetwork.com] On Behalf Of Ken McSwain
    Sent: Wednesday, December 01, 2010 6:41 PM
    To: Teresa Dean
    Subject: Re: [Tessitura Technical Forum] Insert data into table

     

    Hi Teresa

    What I would do is:

    1. Use the Import Data tool in SQLS Management Studio to import your spreadsheet into a local table. ( I actually have a "staging" db set up to hold temp import data like this, to try to keep impresario a bit tidier)
    2. use the INSERT INTO / SELECT syntax to copy from the temp table into t_custom_ask_amounts, like this:
    INSERT INTO impresario.dbo. t_custom_ask_amounts ([customer_no],[season_no],[type],[amount])
            SELECT [customer_no],[season_no],[type],[amount])
            FROM staging.dbo.LT_teresas _import_table
    or something like that
    Ken

    From: Teresa Dean <bounce-teresadean9276@tessituranetwork.com>
    Sent: 12/1/2010 6:13:40 PM

    I'm drawing a blank and need some help.  I need to populate the t_custom_ask_amounts table with data from a spreadsheet.  I think there is a much easier way besides an insert script one row at a time.  I just can't remember what I did last season to populate the table.  Can someone give me a quick and easy way to get my spreadsheet data into the table???

    Teresa




    This message was sent automatically to you by www.tessituranetwork.com because you subscribed to the Tessitura Technical Forum. You may reply to this message to post to the Technical forum or visit the site to search, read and post to the forums. In the interest of keeping the forum posts from becoming cluttered, we encourage you to delete previous message text from your reply before sending. Thank you!