Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
Luuk123
Yak Posting Veteran
52 Posts |
Posted - 2013-10-31 : 03:48:08
|
Hi all,I have a query that generates invoices which checks an input parameter (period) to determine if the grouping is per week/4weeks/month.I can use three seperate querys, each for one grouping-type, but I'm wondering if there's a way to use one query with a grouping set dependend on the parameter.Using grouping sets is such a way, but this generates results for all three grouping sets and I can't identify which one is needed.Does anyone have an idea?Thanks! |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
|
Luuk123
Yak Posting Veteran
52 Posts |
Posted - 2013-10-31 : 08:07:48
|
Thanks, it works! |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2013-10-31 : 08:28:02
|
welcome------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/https://www.facebook.com/VmBlogs |
|
|
|
|
|