• Dec
    23

    import excel to sql server 2005/2008

    Filed under: MSSQL - SERVER;

    save you excel in csv.

    Bulk
    INSERT elect
    FROM ‘c:\data\file2.csv’
    WITH
    (
    FIELDTERMINATOR = ‘,’,
    ROWTERMINATOR = ‘\n’
    )
    GO
    –Check the content of the table.
    SELECT *
    FROM elect
    GO

    elect isĀ  your table name and c:\data\file2.csv is your csv file path.

    Nishant

    No Comments

Leave a Reply