SQL Export Data From Ms. Sql Server to Ms. Excell


INSERT INTO OPENROWSET ( ‘Microsoft.Jet.OLEDB.4.0′,’Excel 8.0;Database=D:\Latihan.xls;’,
‘SELECT [No Faktur], [Tanggal] FROM [Sheet1$]’)
SELECT [No Faktur], [Tanggal] FROM TrsSale
ORDER BY [No Faktur]

Untuk mengeksekusi perintah Sql tersebut yang harus diperhatikan adalah, anda harus membuat terlebih dahulu suatu File Excell (D:\Latihan.xls), dan di file excell tersebut di Sheet1, anda telah menuliskan No Faktur di cell A1, dan Tanggal di B1.
Selamat Mencoba🙂 .

About alkahfi

Bekerja di bidang IT-MIS di sebuah perusahaan Optik di Medan, sebagai Software Enginer.

Posted on January 31, 2008, in Programming. Bookmark the permalink. Leave a comment.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: