question

rkvvrkvarma avatar image
rkvvrkvarma asked

Hi !! I am new to SQL !! I am trying to write a sql query which will automatically export table data into a excel file for every 5 minutes.

I tried with this query .

INSERT INTO OPENROWSET ('Microsoft.Jet.OLEDB.4.0', 'Excel 8.0;Database=c:\Test.xls;','SELECT * FROM [dbo].[PAYMENT_METHOD]') .

But I am getting an error " Incorrect syntax near ')'." . Can anyone please help me how to write this query?

sqlsql server 2012
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

0 Answers

·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.