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
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
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.
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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.