Hi I need to write a query as the following.(What I want is to simplify it)Select f1,f2,....sum(f19) as f19, sum(f20) as f20 from t where f15 is nullgroup by f1,f2,.... f18UnionSelect f1,f2,....f19, sum(f20) as f20 from t where f15 is not nullgroup by f1,f2,.... f19
Can I do this in 1 statement, rather than 2 lengthy statemts & a union?Note: The Column Names are lengthy and the query is so long, so I put f1,f2,... instead of real names.Srinika