Tuesday, April 3, 2012

read the lines from a .txt file into a table within a stored procedure

CREATE TABLE ##Foo (Record VARCHAR(500))
EXEC ('BULK INSERT ##Foo FROM "' +@MyPathToAFile + '" WITH (KEEPNULLS)'

No comments:

Post a Comment