Senin, 16 April 2012

SQL join on two tables that are not related or have primary keys

I have the following query:- select dbo.table1.service, dbo.table1.level_3_structure, Sum(table1.Reduced) as Total_Reduced from dbo.table1 where dbo.table1.Period = 'Cumulative' Group by dbo.table1.service, dbo.table1.level_3_structure Which results in something similar to this:- service level_3_structure Total_Reduced Service 1 Structure1 11.76 Service 2

0 comments:

Posting Komentar