It'[s pretty simple with Bulk Insert and a BCP format file. Take a look in Books Online. If your were to provide the first 100 lines of the flat file and attach it to your next post as a txt file AND provide the record layout AND provide the CREATE statement for the target table, I'm thinking that somone could probably bang it out for you.

--Jeff Moden"RBAR is pronounced "ree-bar" and is a "Modenism" for "Row-By-Agonizing-Row".

First step towards the paradigm shift of writing Set Based code: Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column."

using SSIS you can use your flat fiel as your source file and the SQl table as you destination. in your destination click on mapping to match all columns. if you see only one columns check your flat file connection asnd make sure your Format is correct: Delimitedthen click on column and check your row and column delimeter.

You can define cr/lf delimiter for getting data in rows. As far as columns are concerned, you can use substring function of sql to create and fill columns. eg: if you need to spilt 'goodluck' into 2 columns - good|luck

col1 = substring(columnName,starting position,length)col1=substring(ColumnName,1,4).....will give 'good' from column columnName which can be filled into new created column..

GAURAVKAUSHIK26 (9/9/2008)You can define cr/lf delimiter for getting data in rows. As far as columns are concerned, you can use substring function of sql to create and fill columns. eg: if you need to spilt 'goodluck' into 2 columns - good|luck

col1 = substring(columnName,starting position,length)col1=substring(ColumnName,1,4).....will give 'good' from column columnName which can be filled into new created column..

Yep, that would work, as well, and it'll be pretty fast. But a Bulk Insert using a BCP Format file would be faster.

Still waiting on the OP to attach a sample file and the CREATE statement for the target table, though...

--Jeff Moden"RBAR is pronounced "ree-bar" and is a "Modenism" for "Row-By-Agonizing-Row".

First step towards the paradigm shift of writing Set Based code: Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column."