Hello All,

I'm a developer newly aquainted to the beauty of excel reports via pivot tables. So here's my delimma, I have a sheet in which I execute a query. This query uses three parameters such as start month, end month, and year to retrieve data from the database. This works great. As soon as I add a subquery to the SQL statement that excel is editing, it tells me that the query is not valid and that all of the excel parameters contained within the query are bad. If I take those parameters out, (for a test to determine if it thinks the sql syntax is bad), and replace them with real values, such as 2004 for the year, the query works great. I know that the issue somehow relates to my subquery because all of my other parameterized queries work great, (without subqueries mind you). My first born child to anyone who can give me a solution other than to not use subqueries, which I don't see there being a work around for sql wise.

Thanks so much,
Ryan