How to insert Value thrugh in excel

  • Hello Experts,

    How can we insert the value thrugh excel?

  • I'm going to post a new thread about helping with this exact same topic, but I would do the bulk insert feature, like this:

    Bulk Insert IARTS..VINVehicleDescription

    From 'F:\VINVehicleDescriptionUpdate.csv'

    With

    (

    FirstRow = 1,

    FieldTerminator = ',',

    RowTerminator = '',

    KeepNulls

    )

    The csv file (comma-separated values) contains all of the fields and data for the insert (including the identity column).

    Google tsql bulk insert and you will find alot info on the subject.

  • By the way, the "RowTerminator" option should have a value of "backslash n" inside the ticks, like ''

    edit: damnit, still not showing my slash n..........it should be inside the ticks

  • arpit3613 (4/11/2011)


    Hello Experts,

    How can we insert the value thrugh excel?

    select * into tablename FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0', 'Excel 8.0;Database=D:\testing.xls;HDR=YES', 'SELECT * FROM [Sheet1$]')

    Thanks
    Parthi

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply