Click to See Complete Forum and Search --> : SQL Import


bp_travis
12-19-2008, 11:06 AM
I am new to SQL and need to know the command to IMPORT a file into a MSSQL table. Here is what I have so far and its not working.

BULK INSERT my_table
FROM 'http://www.mywebsite.com/file.csv'
WITH
{
FIELDTERMINATOR =',',
ROWTERMINATOR = '\n'
}
GO

When I run this query on the table, it does nothing, it doesn't even report an error.

Thanks.

chazzy
12-20-2008, 08:14 AM
I believe it should be:


WITH (
options...
);
instead of curly's