Hi,
I am unable to load data from flat file to sql table using bulk insert sql statement
my code:-
DECLARE @filePath VARCHAR(200)
DECLARE @sql VARCHAR(8000)
Declare @filename varchar(100)
set @filename='CCNVZ_150401054418'
SET @filePath = 'I:\IncomingFiles\'+@FileName+'.txt'
DECLARE @TableName VARCHAR(225)
declare @sqltruncate varchar(250)
SET @TableName = 'DataStaging.dbo.Staging_Temp'
SET @sql = 'BULK INSERT '+ @TableName +
' FROM ''\\RLDEVOLP04\IncomingFiles\'+@FileName+'.txt''
WITH (FORMATFILE = ''I:\Format.xml'',BATCHSIZE = 10000) '
SELECT @sql
select @filePath
select @filename
select @TableName
please help me to get resolved the issue.
regards,
Vipin jha