Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Sharing data between datasets
aaron.haskins
<p>Hi,</p><p> </p><p>This hypothetical (somewhat) so lets say I have three datasets:</p><p> </p><p>1 - This dataset runs a query to find a MAX</p><p>2 - This dataset runs a query to find a MIN</p><p>3 - This query does some stuff that uses the MAX and MIN to report on data between these two results.</p><p> </p><p>How would I pass the MAX and MIN to the third dataset? Is this possible?</p><p> </p><p>Thanks in advance,</p><p> </p><p>Aaron</p>
Find more posts tagged with
Comments
GLO_FR
<p>Why not just one dataset with subselect ?</p><pre class="_prettyXprint _lang-sql">SELECT FIELD1, FIELD2, FIELD3FROM TABLE1 AINNER JOIN (SELECT MAX(FIELD) AS MAX_VALUE FROM TABLE2) B ON A.FIELDXXX = B.MAX_VALUEINNER JOIN (SELECT MIN(FIELD) AS MIN_VALUE FROM TABLE3) CON A.FIELDYYY = C.MIN_VALUE</pre><p> if you still want multiple dataset, create a joined dataset with dataset1 and dataset2 joined to dataset3</p>
aaron.haskins
<p>Thanks for your reply.</p><p> </p><p>Basically, we have a stored procedure that pick ups a min and max once, and then it runs a handful of different queries afterwards. The reason the min and max is done seperately is so that it runs just the once and those values are passed into the other queries.</p><p> </p><p>I hope that makes sense.</p>
GLO_FR
<p>Yes, it make sense.</p><p> </p><p>[color=rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;]Creating a joined dataset with dataset1 and dataset2 joined to dataset3 doesn't solve your problem ?[/color]</p>
GLO_FR
<p>There are other solutions with some scripting</p><p>one simple example here.</p><p>I'm using dataset CITY and COUNTRY to set values of paramCITY and paramCOUNTRY which are used in the CALSSIC MODEL DATASET</p><p>-> 2 lines of scripting</p>