0 Replies Latest reply on Mar 25, 2013 7:43 PM by mlvenkatesh

    Using java to execute distributed queries SQL server DB

      Hi all,

      Need to extract all the records in a SQL server DB table and store in a excel file. Am trying to use distributed query
      insert into OPENROWSET('Microsoft.Jet.OLEDB.4.0',
          'Excel 8.0;Database=c:\temp\exported_data.xls;',
          'SELECT * FROM [TEST$]') SELECT * FROM dbo.table_name
      I have requsted for rights to perform this query.

      The question is can i execute this query from java through the standard JDBC application program interfaces (APIs) using sqljdbc.jar?

      I would have tried this but am waiting for the rights to execute distributed queries