September 19, 2008 at 9:21 am
Hello
I have a complex report to wrtie with a query which looks simple but isnt, my question is that each column has it own seperate query, how do i combine all such queries into one select query?
Does anyone know....
September 19, 2008 at 9:29 am
Can't answer your question without seeing the query.
😎
September 19, 2008 at 9:33 am
Hi,
I hvae something similar but had a different dataset and graphs for different criteria. I have one query which calculates everything and insert into one table with type of criteria. I am inserting type into table so that i can differentiate into report.
You can insert all data into one table and insert one more field as required by your column. Like column1, column2 etc for your record.
When you get the data in RS at that time you get only one dataset but filter it according to your column value from table. You might need to create different dataset for different column. But it really depends on how your report looks like. It worked for me because i have 10 different criteria and showing details for each criteria.
Just think about using filter into dataset from one table. So your sp should only cretae one table with all the data.
i hope it helps.
September 19, 2008 at 9:41 am
Hi DVA2007
Will the aggregate results be grouped by date in the new table, thats where my main problem is coming from, the need for the aggregated results to be group by date?
September 19, 2008 at 9:52 am
Hi,
I need monthly data so i grouped by mm/yy. It really depends on what kind of data you have and do you really needs to group by date. Make sure you group by some specific format. otherwise if it is datetime format then it cant group by. As 12:13:23:00:00:33 and 12:13:23:00:22:01 is different.
regards,
vijay
September 19, 2008 at 10:11 am
Yeah it needs to be a daily aggregate to appear in the attached excel spread sheet format
September 19, 2008 at 10:36 am
had a mismatch when trying to create a temp table and the data were not cor-related.....
September 19, 2008 at 7:09 pm
Step 1. Throw the original query as far away as possible.
Step 2. Read the following article.
http://www.sqlservercentral.com/articles/T-SQL/63681/
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 8 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply