how to generate merge report from multiple databas | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

how to generate merge report from multiple databas

Suppose a main retailer shop has 3 branches each individually maintain their own database using sqlserver2000 and their database structure is identical. At the day end these 3 branch databe is imported to the main Retail shop’s databse. My problem is :
I want to generate merge report which contains the sale details of all branches from the main retail shop(branch wise sale report). Plz give me the solutions
.
Do you need something like this? Select T1.columns, T2.columns from DB1..Table1 T1 inner join DB2..Table2 T2 on T1.keycol=T2.keycol Madhivanan Failing to plan is Planning to fail
hi,
if all your databases are in one SQL Server, you can call/query data from any database environment using database_name.database_ownername.table_name
or
database_name..table_name
with select statement. -Johnson
In select statement you should mention the databasename1.tablename1, databasename2.tablename2 then you can merge no of tables with different databases…
VSNREDDY Be pure to do good.[Vivekananda]
quote:Originally posted by vsnreddi In select statement you should mention the databasename1.tablename1, databasename2.tablename2 then you can merge no of tables with different databases…
VSNREDDY Be pure to do good.[Vivekananda]
No it should be databasename1..tablename1, databasename2..tablename2 or databasename1.dbo.tablename1, databasename2.dbo.tablename2 Madhivanan Failing to plan is Planning to fail
]]>