Bulk import data to SQL server (1 Viewer)

danb

Registered User.
Local time
Today, 07:15
Joined
Sep 13, 2003
Messages
98
Hi,

I'm using a thrid-party data provider to supply me with technical product specs for my e-commerce website.

They have provided me with three very lengthy SQL scripts and several large (up to 30Mb) text files. When I run the first script it creates a bunch of tables. This executes successfully and as far as I can see creates the tables it's supposed to.

THe second script is supposed to bulk import the text file data into the tables. There are several lines like this:

Code:
BULK INSERT dbo.cds_cctxx
	FROM 'C/My File Directory/data/catalog/cctxx.txt'
	WITH (ROWTERMINATOR ='\n', BATCHSIZE = 50000, CODEPAGE = 'ACP')


I've tried to run these, and made sure that the text files are all referenced with the correct paths on my local machine. This executes successfully, but when I look in the tables, no records are there.

Is this because I'm trying to load text files from my local machine? Do they have to be on the same machine that is running the database?


Any help would be greatly received, thanks!
 

danb

Registered User.
Local time
Today, 07:15
Joined
Sep 13, 2003
Messages
98
Okay, it's just occured to me to that script 2 creates a stored procedure, which I then have to run for it to take effect (sorry I'm new to MS SQL).
 

Users who are viewing this thread

Top Bottom