Bulk Import with data like cobol S99V999

  • hello, sorry for my english

    i must import with bulk insert and format file data into sql server 2008

    I have the file ascii with data to import like this

    xxxxxxxxxxxx.......

    xxxxxxxxxxxxxxx+12500xxxx (note the comma is not present because is S99V999 cobol )

    xxxxxxxxxxxx.......

    i must import with bulk insert the value 12500 into a sql server field type numeric(6,3)..

    so the value registered must be 12,500

    what's i must write into file format ?

  • Could you please attach a sample file?

    Regards,

    Iulian

  • i think you'll have to bulk insert into a staging table, and then move fromt he staging table to a final table. BULK insert doesn't have any data massaging like that on the import process, that's something i've always done after gettting the data into a table.

    the move would have to divide the value by 1000 to get the value you want.

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

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

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