load textfile with fixed record lenght and no delimmiters

  • hello guys

    i want to import a big text file with a fixed record length(288) to tables.i need to read a record and check it then call a store procedure for convert some fields to import 1 table for some condition and if that condition not true import in another table.i do not want to use ssis package.please help me thnks

  • eatemadnia.f (7/1/2012)


    hello guys

    i want to import a big text file with a fixed record length(288) to tables.i need to read a record and check it then call a store procedure for convert some fields to import 1 table for some condition and if that condition not true import in another table.i do not want to use ssis package.please help me thnks

    Is it a one-time activity and how many records are there in the file ?

    --rhythmk
    ------------------------------------------------------------------
    To post your question use below link

    https://www.sqlservercentral.com/articles/forum-etiquette-how-to-post-datacode-on-a-forum-to-get-the-best-help
    🙂

  • Off the top of my head (not a lot of info to go on) create a temp / staging table then bcp / bulk insert the file and use substring to split the data out to the relevant table after that.

    -------------------------------Posting Data Etiquette - Jeff Moden [/url]Smart way to ask a question
    There are naive questions, tedious questions, ill-phrased questions, questions put after inadequate self-criticism. But every question is a cry to understand (the world). There is no such thing as a dumb question. ― Carl Sagan
    I would never join a club that would allow me as a member - Groucho Marx

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

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