Click here to Skip to main content
15,885,366 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:

Dear friends

i have a big problem i have 4 database in sql server2008 R2 but i want generate a single report from all four database

please help me any one
Posted

1 solution

I see two approaches, you can either

or
  • Retrieve all the needed data from each database (with independent queries) and then generate the report with VB6 code.
     
    Share this answer
     
    Comments
    kpolecastro 14-Jan-14 17:33pm    
    Are all of your databases running on the same SQL Instance?

    If so, you should be able to write a script that will combine all of them.

    What kind of data are you looking to generate? Are there any relationships between them (Primary keys, etc)?
    Depending on what you are looking for you may be able to write something Like (this is if both databases are on the same instance)

    SELECT Database1.dbo.items.Price, Database2.dbo.Items.Cost
    FROM Database1.dbo.items INNER JOIN Database2.dbo.Items ON
    Database1.dbo.items.ID = Database2.dbo.Items.ID

    This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



    CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900