I imported an Excel (.xlsx
) file into a table in SQL Server using the import wizard.
I want to get the query used to import so that I can store it and incorporate it in a SQL Server stored procedure. How can I get that query?
I imported an Excel (.xlsx
) file into a table in SQL Server using the import wizard.
I want to get the query used to import so that I can store it and incorporate it in a SQL Server stored procedure. How can I get that query?
Copyright © 2021 Jogjafile Inc.
You can't get the specific query used by the wizard, you can only save the SSIS package for later use. You can do this with other methods, via sql, which you can include in your stored procedure as explained in the official documentation.
OPENROWSET
BULK INSERT