Link to home
Start Free TrialLog in
Avatar of Omer-Pitou
Omer-Pitou

asked on

SQL SERVER BULK INSERT

Dear Sirs,

I have a flat text file that I want to import into a SQL Server table.
The rows don't have delimiters, it is like a long String.
All I know is that: the 5 first characters represent the ID, the next 25 Description, and so no.
How can such an import succeeds with FORMATFILE clause.
An example of code will be appreciated.

Omer
Avatar of Vitor Montalvão
Vitor Montalvão
Flag of Switzerland image

You don't need any code for that.
In SQL Server Management Studio (SSMS) right-click on the database you want to import to and chose Tasks, Import Data... Now just follow the wizard to complete the operation.

User generated image
Avatar of Omer-Pitou
Omer-Pitou

ASKER

Thanks for your input.
I actually need to include it in code. I can't let the user to go to the database and perform such a risky operation.
ASKER CERTIFIED SOLUTION
Avatar of grendel777
grendel777
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial