1

I have a text file, which I want to insert into a table in my database.

My query looks like this:

BULK INSERT myDepartment
FROM 'C:\myDepartment-c-t.txt'
WITH (
  DATAFILETYPE = 'char',
  FIELDTERMINATOR = '\t', -- default terminator
  ROWTERMINATOR = '\n'
);

On executing it, SQL Server Management Studio 2008 gives the following error:

'BULK' rowset provider not supported in this version of SQL Server.

I googled it and found that SQL Server 2008 does support BULK INSERT. Can anyone tell me what am I missing?

0

2 Answers 2

7
'BULK' rowset provider not supported in this version of SQL Server.

BULK INSERT is not supported on SQL Azure. You can use bcp or write something that wraps SqlBulkCopy to bulk insert into SQL Azure. There's other ways to bulk insert aside from these, too.

On executing it,my SQL management studio 2008,gives the following error :

Don't confuse SQL Server Management Studio with SQL Server Database Engine.

0

BCP is one way to go.

I've actually used the method stated here: Bulk insert with Azure SQL.

Basically you bulk insert your data to a local MSSQL database (which is supported). Create a txt file with all data and bulk insert it into your azure table by using the BCP command in command prompt.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.