I am new to SQL and am trying to create a stored procedure that will read a semicolon delimited text file into a table. Any help on this would be much appreciated!
You can create a stored procedure that uses the BULK INSERT command, and you'll want to use the FIELDTERMINATOR option to specify semicolons. Robert Bradley
No idea how to 1) create a stored procedure or 2) how to use Bulk Insert?
1) See CREATE PROCEDURE in Books Online; basically, its:
[tt]create procedure myproc as
select * from mytable[/tt]
This is a simple example, but you get the idea - any single or series of SQL Statements can be used within the SP.
2) Join the crowd. You can trial-and-error it from Query Analyzer using a test file and test table, then use that as the basis for your stored procedure. Robert Bradley
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.