need help creating several excel or access files from a query

  • Hi, I have a table with the next structure: customer_id, product, date_product,product_qty

    so I need to export to a file (excel o access) for each customer_id like:

    customer_01.xls, customer_02.xls, etc. or customer_01.mdb, customer_02.mdb, etc.

    any ideas?

    thanks

  • There are four ways I can think of right now:

    1) from the "target system" (Excel or Access), connect to the SQL Server and select the values you need,

    2) use T-SQL and look into bcp command with queryout option in BOL (BooksOnLine),

    3) use the export wizard in Management studio (right click on the database) or

    4) create an SSIS export package.

    There are quite a few samples described in this forum. I'd recommend you search for "export Excel" and the option you'd like to use.



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply