Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Flora Tzeng
 
Posts: n/a
Default Parameters are not allowed in queries that can't be displayed grap

Until now, I have always used MSQuery to create queries with parameters, and
then embedded the query into an Excel spreadsheet. This would allow me to
anchor my parameters to certain cells on the spreadsheet. My report users
could then change the values in those cells and click a button to refresh the
query data. This works wonderfully with simple queries.

Now I have created a very complex query, specifically a query that uses a
subquery as its SELECT FROM. When I try to set up my parameters in MSQuery
for this query... it says "parameters are not allowed in queries that can't
be displayed graphically." Without being able to put parameters in my query,
I can't automate this using Excel.

Is there some other way to accomplish what I want to do?

Thanks,

Flora

My SQL is:

SELECT UM00163T.METER_NO, UM00100M.LOCATION_ID_CUSTOM, UM00163T.READ_DTM,
UM00163T.READ_AMT
FROM UM00100M, UM00163T,
(SELECT UM00163T.METER_NO, MAX(UM00163T.READ_DTM) AS READ_DTM
FROM UM00163T
GROUP BY UM00163T.METER_NO)TEMP
WHERE UM00100M.LOCATION_NO = UM00163T.LOCATION_NO AND UM00163T.CYCLE_CD=?
AND UM00163T.METER_NO = TEMP.METER_NO AND
UM00163T.READ_DTM = TEMP.READ_DTM
ORDER BY UM00100M.LOCATION_ID_CUSTOM

  #2   Report Post  
Jamie Collins
 
Posts: n/a
Default


Flora Tzeng wrote:
Until now, I have always used MSQuery to create queries with

parameters, and
then embedded the query into an Excel spreadsheet. This would allow

me to
anchor my parameters to certain cells on the spreadsheet.

Now I have created a very complex query, specifically a query that

uses a
subquery as its SELECT FROM. When I try to set up my parameters in

MSQuery
for this query... it says "parameters are not allowed in queries that

can't
be displayed graphically."


Create a VIEW on the database server containing the SQL. Modify your
Excel app to query the VIEW rather than the base tables.

Jamie.

--

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Show queries Brett Excel Discussion (Misc queries) 1 March 7th 05 05:31 PM
Excel 2003 This Workbook contains queries to external data Puzzled of Springburn Excel Discussion (Misc queries) 0 February 8th 05 03:21 PM
How to summarize data based on specific parameters Water guy Excel Discussion (Misc queries) 1 February 7th 05 10:26 PM
Format spreadsheet so no input allowed if certain cell is =<0 Jan Buckley Excel Worksheet Functions 9 January 26th 05 12:21 AM
parameters option on the external data toolbar is not available Brink Excel Discussion (Misc queries) 0 January 4th 05 05:57 PM


All times are GMT +1. The time now is 11:15 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"