Hi all,
I’m trying to import excel file to SQL database by using Execute Query activity. The query works fine when I do not use parameter like below:
“Select * Into #TempData450 From OPENROWSET(‘Microsoft.ACE.OLEDB.12.0’, ‘Excel 12.0;Database=C:\Users\Public\Desktop\test.xlsx’, [‘1$’])”
But when I use parameter instead of file path like below, it gives an error.
“Select * Into #TempData450 From OPENROWSET(‘Microsoft.ACE.OLEDB.12.0’, ‘Excel 12.0;Database=@450FilePath’, [‘1$’])”
Btw, i also tried ODBC connection with question mark (?) and SQL Server Connection with @450FilePath instead of parameter.
Can anyone help with this?
Regards,