export from sql to excel

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Growth
    New Member
    • Nov 2007
    • 1

    #1

    export from sql to excel

    I want to export the data from sql toexcel.

    I do The following procedure

    First i m enableing ad hoc then

    Create linked server and after that i have created excel file with header which is one of the column name of my table and then run a query Of select * from openrowst
    but i get an error of "Can not Initialize the Data source object of oledb Provider Microsoft.jet.o ledb.provider.4 .0 for linked server "(Null)""

    Plz reply if anyone know very urgetnt
  • gfajardo
    New Member
    • Nov 2007
    • 4

    #2
    Only you need use Bcp on query analyzer

    Code:
    [B]bcp [/B]"Select * from Northwind.dbo.orders" queryout c:\output.xls -c -S"nameserver" -U"sa" -P"password"

    Originally posted by Growth
    I want to export the data from sql toexcel.

    I do The following procedure

    First i m enableing ad hoc then

    Create linked server and after that i have created excel file with header which is one of the column name of my table and then run a query Of select * from openrowst
    but i get an error of "Can not Initialize the Data source object of oledb Provider Microsoft.jet.o ledb.provider.4 .0 for linked server "(Null)""

    Plz reply if anyone know very urgetnt

    Comment

    • ck9663
      Recognized Expert Specialist
      • Jun 2007
      • 2878

      #3
      If this is a one-time thing, use DTS

      --CK

      Comment

      Working...