Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Bulk Insert Question
Message
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Titre:
Bulk Insert Question
Divers
Thread ID:
00672742
Message ID:
00672742
Vues:
40
Hi,

I would like to create a SP to execute a BULK INSERT.

If I run the following in QA - it works fine...
BULK INSERT ATMPOS.dbo.[TransactionDetails]
   FROM 'd:\testing99.txt'
   WITH 
      (
       FIELDTERMINATOR = '|',
	   KEEPNULLS
       )
However, if I try the following, it doesn't work
declare @PathVC varchar(100)

set @PathVC = 'd:\testing99.txt'


BULK INSERT ATMPOS.dbo.[TransactionDetails]
   FROM @PathVC
   WITH 
      (
       FIELDTERMINATOR = '|',
	   KEEPNULLS
       )
Can I not use a declared variabe containing the filename and path? Or, is there a better way to do this? I want to execute this from VB6.

Thanks in advance.
Al Williams

Anola MB, CANADA
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform