Click to See Complete Forum and Search --> : Executing a t-sql string stored in c#


scolty
June 7th, 2011, 09:22 AM
Hi, ive managed to get the following command to work but i had to remove the "go" commands that i usually use in the string when im SQL server. Could someone please clarify why i needed to get rid of them??



string strImport = @"BULK INSERT CSVTest FROM "DataFile"
WITH
(
FIELDTERMINATOR = ',',
ROWTERMINATOR = '\n'
)
SELECT *
FROM CSVTest
";