Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Environment variables

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2004-09-20 : 08:29:01
Kumar S A writes "Hi: We are planning on installing a database solution at a few client locations. We understand that different clients will have different hardware configurations. I have been given the job of writing a generic BULK INSERT script that can pick up the format file and write the output file based on environment variables rather than hardcoding the drive letters and directory structure in the scripts. I tried something like this...but, it wouldn't work ......

BULK INSERT tab_temp_data
FROM '%clientloc%\input.dat'
WITH (FORMATFILE = '%clientloc%bcpinp.fmt',
BATCHSIZE = 50000,
MAXERRORS = 1)

Thanks in advance for your help!!!!!

S A K"

samsekar
Constraint Violating Yak Guru

437 Posts

Posted - 2004-09-20 : 11:39:11
Why not BCP IN !!

- Sekar
Go to Top of Page
   

- Advertisement -