Passing a file path to a SP
- From: Maury <maurizio.alberti_TOGLI_@xxxxxxxxx>
- Date: Mon, 03 Apr 2006 11:42:14 GMT
I'm trying to write a SP that
accept in input a parameter with the name
of a file (with complete path)
but I noticed some problems....
It's right this way? Thanks!
set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
go
ALTER PROCEDURE [dbo].[BI]
@FileToImport nvarchar(100)
AS
BEGIN
SET NOCOUNT ON;
DECLARE @SQL nvarchar(200)
SET @SQL = "BULK INSERT tmptable FROM '"+@FileToImport+"'"
EXEC (@SQL)
END
.
- Follow-Ups:
- Re: Passing a file path to a SP
- From: Dan Guzman
- Re: Passing a file path to a SP
- Prev by Date: Re: alter table column, which is part of foreign key
- Next by Date: Re: Passing a file path to a SP
- Previous by thread: Are embedded views (Views within views...) evil and if so why?
- Next by thread: Re: Passing a file path to a SP
- Index(es):
Relevant Pages
|
Loading