question

chaheti avatar image
chaheti asked

import data from Excel with dynamic filepath,tablename using stored procedure

plzz help in importing data from excel...i want to import data from excel with all dynamic filenames...here is my script alter procedure a @sheetName varchar(100) @filePath varchar(100) @HDR varchar(100) Begin declare @sql nvarchar(1000) set @sql='select *from OpenDataSourec' set @sql=@sql+'(' 'Microsoft.ACE.OLEDB.12.0' ',' 'datasource='+@filePath set @sql=@sql+';Excel 12.0;IMEX=1:HDR='+@HDR set @sql=@sql+',select *from[' + @sheetName+']' ')' here an error of unclosed quotation mark...plzz help me
import-data
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

0 Answers

·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.