DebbieChapman
Programmer
Does anybody know how i can send the file name to a stored proceedure.
I've written a stored proceedure which used bulk insert to inport the contents of an excel spreadsheet (debbie.xls for example)
i pick up the file name from within msAcces and can pass this in a variable to a stored proceedure. but when it then use variable in the stored proceedure, it doesnt read it
eg
CREATE PROCEDURE NCSImport @FileName VarChar(200)
AS
BEGIN
CREATE TABLE #NCSimport
(CPSO_Order Varchar(25),
System_Order_No Varchar(25))
BULK INSERT #NCSimport
FROM '@filename' <--this being the variable which contains the filename ie c:\debbie.xls
WITH (FIELDTERMINATOR = ',', TABLOCK)
can anyone help
I've written a stored proceedure which used bulk insert to inport the contents of an excel spreadsheet (debbie.xls for example)
i pick up the file name from within msAcces and can pass this in a variable to a stored proceedure. but when it then use variable in the stored proceedure, it doesnt read it
eg
CREATE PROCEDURE NCSImport @FileName VarChar(200)
AS
BEGIN
CREATE TABLE #NCSimport
(CPSO_Order Varchar(25),
System_Order_No Varchar(25))
BULK INSERT #NCSimport
FROM '@filename' <--this being the variable which contains the filename ie c:\debbie.xls
WITH (FIELDTERMINATOR = ',', TABLOCK)
can anyone help