Dennis C
Dennis C

Reputation: 24747

The most elegant way to import flatfiles into SQL server 2005 without using SSIS

For some reasons, SSIS is not avalialble.

I read about OPENROWSET, but I will have others problem from on the format file and path of file.

How can I do it in a elegant way?

Upvotes: 2

Views: 509

Answers (3)

Dave Markle
Dave Markle

Reputation: 97821

Not knowing your whole situation, here's what I would recommend on the face of it.

If you don't have SSIS, and you don't want to deal with the BULK INSERT/bcp format file, I would venture to say that the most elegant way to import the file would be to write your own small .NET-based console application to do it.

Note that if you can load data into a DataTable, you can use the SqlBulkCopy class in .NET.

Upvotes: 1

Learning
Learning

Reputation: 8185

You can always use bcp utility

It's been around since the earliest versions and is very easy to use.

Upvotes: 1

Abram Simon
Abram Simon

Reputation: 3269

If the files are delimited like a csv you could use the Fast CSV Reader found on CodeProject. If it's not a standardized format then I agree with Dennis, a custom console app may be the way to go.

Upvotes: 1

Related Questions