Registriert seit: 12. Aug 2003
Ort: Soest
4.016 Beiträge
Delphi 10.1 Berlin Enterprise
|
Re: SQL Server 2008 - StoredProcedure
5. Mär 2010, 12:21
SQL-Code:
declare @ sql varchar( max);
declare @filename varchar(100);
set @filename = ' c:\test.xls'
set @ sql = ' SELECT * INTO Import FROM OPENROWSET('' Microsoft.Jet.OLEDB.4.0'' ,
'' Excel 8.0;Database=' + @filename + ' '' , '' SELECT * FROM [Tabelle1$]'' )';
exec (@ sql);
|