Results 1 to 3 of 3

Thread: Parameters are not working in embedded SQL Query in Excel

  1. #1
    Join Date
    Jan 2011
    Posts
    26

    Parameters are not working in embedded SQL Query in Excel

    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.
    My SQL is:
    • SELECT UM00163T.METER_NO, UM00100M.LOCATION_ID_CUSTOM, UM00163T.READ_DTM, UM00163T.READ_AMTFROM 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. #2
    Join Date
    Aug 2011
    Posts
    564

    Re: Parameters are not working in embedded SQL Query in Excel

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

  3. #3
    Join Date
    Aug 2011
    Posts
    580

    Re: Parameters are not working in embedded SQL Query in Excel

    I understand that in the Excel-e are creating a sheet, it is something you write, and now ready to table. Anywhere, but the methods available to the public, without setting different mySQL and SQL Server.

Similar Threads

  1. Looking for Excel Web Query for Java Applet working sample
    By Omswaroop in forum MS Office Support
    Replies: 3
    Last Post: 17-01-2014, 10:04 AM
  2. How to modify the label of embedded-object icon in Excel
    By Omkaari in forum MS Office Support
    Replies: 2
    Last Post: 24-01-2012, 04:55 PM
  3. Replies: 2
    Last Post: 16-07-2011, 04:24 AM
  4. Unable to open embedded PDF documents in excel 2007.
    By Zoello in forum Windows Software
    Replies: 5
    Last Post: 17-05-2011, 09:59 PM
  5. To add query parameters using ODBC.
    By Capper in forum Software Development
    Replies: 1
    Last Post: 23-07-2009, 08:06 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,614,641.48023 seconds with 17 queries