SQL Server Performance

Support required for loading data into sql server

Discussion in 'T-SQL Performance Tuning for Developers' started by arif9000, Apr 7, 2003.

  1. arif9000 New Member

    Hi

    Would really appreciate if some one can help me in developing code for loading data from MULTIPLE source files (text format) into SQL server.

    o Pls. find attach the scripts & the data
    o Your support would highly be appreciated.
    ----------------------------------------------------------

    1. Table structure:
    CREATE TABLE temp
    (
    column1 varchar(11) NOT NULL,
    column2 varchar(11) NOT NULL,
    )

    ----------------------------------------------------------
    2. Bulk Insert query (copying one source file into table)
    BULK INSERT Billing.dbo.cust
    FROM
    'c:a.txt'
    WITH
    (
    FIELDTERMINATOR = ',',
    )

    Result: [this was successfully implemented)

    ----------------------------------------------------------
    3. Problem Area (copying three source files into one table)
    BULK INSERT Billing.dbo.cust
    FROM
    'c:a.txt'
    'c:.txt'
    'c:c.txt'
    WITH
    (
    FIELDTERMINATOR = ',',
    )

    Result: [Errors)

    ----------------------------------------------------------

    PLEASE HELP ME
  2. Chappy New Member

    BULK INSERT doesnt support more than one source file afaik. You can either run multiple bulk insert statements to deal with all three files, or append all the files together and then import that.
    Id personally opt for the former.

Share This Page