ms sql server management studio 2008 importing excel files

Discussion in 'Databases' started by himanshuon, Feb 23, 2011.

  1. #1
    i have 30 excel files. want to create a new database for them using ms sql server 2008. please help.......
     
    himanshuon, Feb 23, 2011 IP
  2. jkl6

    jkl6 Peon

    Messages:
    70
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    1. Save the excel files as .CSV files.
    2. Create a new database
    3. Right click the database and select Tasks=>Import Data
     
    jkl6, Feb 23, 2011 IP
  3. himanshuon

    himanshuon Peon

    Messages:
    42
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    i am getting these errors:

    - Executing (Error)
    Messages
    Error 0xc02020a1: Data Flow Task 1: Data conversion failed. The data conversion for column "Column 2" returned status value 4 and status text "Text was truncated or one or more characters had no match in the target code page.".
    (SQL Server Import and Export Wizard)

    Error 0xc020902a: Data Flow Task 1: The "output column "Column 2" (18)" failed because truncation occurred, and the truncation row disposition on "output column "Column 2" (18)" specifies failure on truncation. A truncation error occurred on the specified object of the specified component.
    (SQL Server Import and Export Wizard)

    Error 0xc0202092: Data Flow Task 1: An error occurred while processing file "C:\nbc\MS SQL Data Backup 12-10-2010 PRABHA\dbo.AuthorAdmin.csv" on data row 4.
    (SQL Server Import and Export Wizard)

    Error 0xc0047038: Data Flow Task 1: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED. The PrimeOutput method on component "Source - dbo_AuthorAdmin_csv" (1) returned error code 0xC0202092. The component returned a failure code when the pipeline engine called PrimeOutput(). The meaning of the failure code is defined by the component, but the error is fatal and the pipeline stopped executing. There may be error messages posted before this with more information about the failure.
    (SQL Server Import and Export Wizard)
     
    himanshuon, Feb 24, 2011 IP
  4. eralper

    eralper Peon

    Messages:
    38
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    In the import wizard there should be a button allowing you configure column mappings
    There you can modify the mapping types, probably you need to increase target column sizes. Also you can use nvarchar data types
     
    eralper, Mar 3, 2011 IP