sync
This commit is contained in:
16
paul_snippets/DataLists/List from Excel.sql
Normal file
16
paul_snippets/DataLists/List from Excel.sql
Normal file
@@ -0,0 +1,16 @@
|
||||
USE Product_Superset
|
||||
GO
|
||||
|
||||
DECLARE @dir NVARCHAR(256) = N'D:\DATA\IMPORT_DATA\RedApp2_Imports'
|
||||
DECLARE @file NVARCHAR(100) = N'Abena Import.xlsx'
|
||||
DECLARE @tab NVARCHAR(100) = N'Tabelle1'
|
||||
|
||||
DECLARE @dir_file NVARCHAR(256) = N'''Data Source="' + @dir + N'\' + @file+ N'"; Extended properties=Excel 12.0'')...[' + @tab + N'$]'
|
||||
SELECT N'SELECT TOP 3 * /* column list goes here*/ FROM OPENDATASOURCE(''Microsoft.ACE.OLEDB.12.0'', ' + @dir_file AS Select_From_Excel
|
||||
|
||||
--SELECT TOP 3 * FROM OPENDATASOURCE('Microsoft.ACE.OLEDB.12.0', @dir_file)...[Tabelle1$]
|
||||
--'Data Source="D:\DATA\IMPORT_DATA\RedApp2_Imports\Abena Import.xlsx"; Extended properties=Excel 12.0'
|
||||
--'Data Source="D:\DATA\IMPORT_DATA\RedApp2_Imports\Abena Import.xlsx"; Extended properties=Excel 12.0')...[$]
|
||||
--FROM OPENDATASOURCE('Microsoft.ACE.OLEDB.12.0', 'Data Source="D:\DATA\IMPORT_DATA\RedApp2_Imports\Abena Import.xlsx"; Extended properties=Excel 12.0')...[$]
|
||||
|
||||
--SELECT TOP 3 * FROM OPENDATASOURCE('Microsoft.ACE.OLEDB.12.0', 'Data Source="D:\DATA\IMPORT_DATA\RedApp2_Imports\Abena Import.xlsx"; Extended properties=Excel 12.0')...[Tabelle1$]
|
||||
Reference in New Issue
Block a user