May 6, 2004 at 4:25 pm
Hello. I'm not sure if this is the right forum for posting this, but here goes.
I use Query Analyzer to run queries that calculate percentages on a table, which I then format into a report using an .adp. I have now one report in which they want the January, February, and March percentages (all run as separate queries in QA) together next to the YTD total for comparison purposes.
My question is this...is it possible (I'm sure it must be and I just don't know how) to run the .sql queries for the monthly totals from within the YTD query, so I can run just one query from QA instead of 4? If it's possible, can someone help me with the syntax? I'm fairly new to T-SQL and still learning, and my search for an answer was unsuccessful.
Thanks for your help.
May 6, 2004 at 4:30 pm
Can you post your current sql statement so we can address what you need better?
May 7, 2004 at 11:39 am
Cynthia,
Since you are coming from an Access ADP I would think what you really need to do is create a stored procedure to do this and then call it from your ADP. But to help further we really need to see some sample data and data structure so that we can be more specific as Antares stated.
Gary Johnson
Microsoft Natural Language Group
DBA, Sr. DB Engineer
This posting is provided "AS IS" with no warranties, and confers no rights. The opinions expressed in this post are my own and may not reflect that of my employer.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply