SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Similar Reports


Similar Reports

Author
Message
Eliza
Eliza
SSC Journeyman
SSC Journeyman (97 reputation)SSC Journeyman (97 reputation)SSC Journeyman (97 reputation)SSC Journeyman (97 reputation)SSC Journeyman (97 reputation)SSC Journeyman (97 reputation)SSC Journeyman (97 reputation)SSC Journeyman (97 reputation)

Group: General Forum Members
Points: 97 Visits: 81
Hi,

We have many reports running that are very similar. Usually 1 column difference for example

Sales by Product
Sales by Month
Sales by Country

We don't have a data warehouse but is there any way we can use SQL to combined these three datasets efficiently but perhaps through parameters only run the chosen report?

I thought about union everything together but I think this might be inefficient and was hoping someone would have a better idea.

Many thanks
Eliza
peterzeke
peterzeke
SSC Eights!
SSC Eights! (870 reputation)SSC Eights! (870 reputation)SSC Eights! (870 reputation)SSC Eights! (870 reputation)SSC Eights! (870 reputation)SSC Eights! (870 reputation)SSC Eights! (870 reputation)SSC Eights! (870 reputation)

Group: General Forum Members
Points: 870 Visits: 1766
Eliza:

I hate to say it, but you need to provide a little bit more information. When you say the reports differ only slightly, does that suggest that all three reports basically contain the same information (i.e., each report basically contains the same data) but merely displayed slightly differently?

Thanks,
Pete



eric.muller
eric.muller
SSChasing Mays
SSChasing Mays (647 reputation)SSChasing Mays (647 reputation)SSChasing Mays (647 reputation)SSChasing Mays (647 reputation)SSChasing Mays (647 reputation)SSChasing Mays (647 reputation)SSChasing Mays (647 reputation)SSChasing Mays (647 reputation)

Group: General Forum Members
Points: 647 Visits: 1354
I think you want to do some research on something called "dynamic grouping", it will let you use the same dataset and group based on a user-selected parameter.

One good page is here, but Googling should find plenty of examples.

Cheers,
Eric
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search