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)
Union of two queries
ajunuthula
Hi,
How to run union of two queries in the "beforeOpen".
my querytext is "select year,month from table1"
and my query will be like
select year,month from table1 where year = 2009 and month >= '02-Feb'
union
select year,month from table1 where year = 2010 and month <= '05-May';
Any help please.
Thank you.
Find more posts tagged with
Comments
mwilliams
If your queryText is currently "select year,month from table1" and you want to make it the second one from above in your beforeOpen, you should be able to simply put:
this.queryText = this.queryText + " where year = 2009 and month >= '02-Feb' union select year,month from table1 where year = 2010 and month <= '05-May'";
Let me know.
ajunuthula
This helps.
Thank you so much.