블로그 이미지
010-9967-0955 보미아빠

카테고리

보미아빠, 석이 (500)
밥벌이 (16)
싸이클 (1)
일상 (1)
Total
Today
Yesterday

달력

« » 2024.5
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31

공지사항

최근에 올라온 글

 

exec sp_configure 'show advanced options', 1
reconfigure with override

exec sp_configure 'Ad Hoc Distributed Queries', 1
reconfigure with override

 

USE [master]
GO
EXEC master.dbo.sp_MSset_oledb_prop N'Microsoft.ACE.OLEDB.12.0' , N'AllowInProcess' , 1
GO
EXEC master.dbo.sp_MSset_oledb_prop N'Microsoft.ACE.OLEDB.12.0' , N'DynamicParameters' , 1
GO

 

/* 1 */
if object_id ('[Table Analysis Tools Sample]') is not null
drop table [Table Analysis Tools Sample]

SELECT * into [Table Analysis Tools Sample]
FROM OPENROWSET
 (
 'Microsoft.ACE.OLEDB.12.0',
 'Excel 12.0; HDR=YES; IMEX=1; Database=C:\DMAddins_SampleData.xlsx',
 'SELECT * FROM [Table Analysis Tools Sample$a3:m]'
 )

select * from [Table Analysis Tools Sample] 

/* 2 */
if object_id ('Forecasting') is not null
drop table Forecasting

SELECT * into Forecasting
FROM OPENROWSET
 (
 'Microsoft.ACE.OLEDB.12.0',
 'Excel 12.0; HDR=YES; IMEX=1; Database=C:\DMAddins_SampleData.xlsx',
 'SELECT * FROM [Forecasting$b5:e]'
 )

/* 3 */
if object_id ('[Fill From Example]') is not null
drop table [Fill From Example]

SELECT * into [Fill From Example]
FROM OPENROWSET
 (
 'Microsoft.ACE.OLEDB.12.0',
 'Excel 12.0; HDR=YES; IMEX=1; Database=C:\DMAddins_SampleData.xlsx',
 'SELECT * FROM [Fill From Example$b3:m]'
 )

/* 4 */
if object_id ('[Source Data]') is not null
drop table [Source Data]

SELECT * into [Source Data]
FROM OPENROWSET
 (
 'Microsoft.ACE.OLEDB.12.0',
 'Excel 12.0; HDR=YES; IMEX=1; Database=C:\DMAddins_SampleData.xlsx',
 'SELECT * FROM [Source Data$a3:m]'
 )

/* 5 */
if object_id ('[Training Data]') is not null
drop table [Training Data]

SELECT * into [Training Data]
FROM OPENROWSET
 (
 'Microsoft.ACE.OLEDB.12.0',
 'Excel 12.0; HDR=YES; IMEX=1; Database=C:\DMAddins_SampleData.xlsx',
 'SELECT * FROM [Training Data$a3:m]'
 )


/* 6 */
if object_id ('[Testing Data]') is not null
drop table [Testing Data]

SELECT * into [Testing Data]
FROM OPENROWSET
 (
 'Microsoft.ACE.OLEDB.12.0',
 'Excel 12.0; HDR=YES; IMEX=1; Database=C:\DMAddins_SampleData.xlsx',
 'SELECT * FROM [Testing Data$a3:m]'
 )

/* 7 */
if object_id ('[New Customers]') is not null
drop table [New Customers]

SELECT * into [New Customers]
FROM OPENROWSET
 (
 'Microsoft.ACE.OLEDB.12.0',
 'Excel 12.0; HDR=YES; IMEX=1; Database=C:\DMAddins_SampleData.xlsx',
 'SELECT * FROM [New Customers$a3:q]'
 )

/* 8 */
if object_id ('[Associate]') is not null
drop table [Associate]

SELECT * into [Associate]
FROM OPENROWSET
 (
 'Microsoft.ACE.OLEDB.12.0',
 'Excel 12.0; HDR=YES; IMEX=1; Database=C:\DMAddins_SampleData.xlsx',
 'SELECT * FROM [Associate$a3:d]'
 )

Posted by 보미아빠
, |

최근에 달린 댓글

최근에 받은 트랙백

글 보관함