Results 1 to 1 of 1
  1. #1
    skydivetom is offline VIP
    Windows 8 Access 2010 64bit
    Join Date
    Feb 2019
    Posts
    1,038

    Need to modify TRANSFORMATION query

    Hello Experts:

    I'm trying to streamline my queries in order to mitigate the need for a "helper" query. Please see below two SQL statements (Design View 1 and Design View 2). Both of these queries execute successfully.
    - The 1st query is currently used as a "helper" query for input to another query (not listed here).


    - The 2nd query is a transformation query which did NOT use a helper query.

    SQL ("Design View 1"):
    Code:
    SELECT [00_tbl_SourceFields].FieldnameStandardized, [00_tbl_SourceFields].FieldStatusFromXLS, Count([00_tbl_SourceFields].FieldnameStandardized) AS [Count]
    FROM 00_tbl_SourceFields
    GROUP BY [00_tbl_SourceFields].FieldnameStandardized, [00_tbl_SourceFields].FieldStatusFromXLS
    HAVING ((([00_tbl_SourceFields].FieldStatusFromXLS)<>"N/A"));
    SQL ("Design View 2"):
    Code:
    TRANSFORM First(Step1.Expr1) AS FirstOfExpr1
    SELECT Step1.FieldnameCurrent
    FROM (SELECT [qry10_AlikeFields_Before_Input].FieldnameCurrent, [qry10_AlikeFields_Before_Input].Source, "●" AS Expr1 FROM qry10_AlikeFields_Before_Input GROUP BY [qry10_AlikeFields_Before_Input].FieldnameCurrent, [qry10_AlikeFields_Before_Input].Source, "x")  AS Step1
    GROUP BY Step1.FieldnameCurrent
    ORDER BY Step1.FieldnameCurrent
    PIVOT Step1.Source;

    Based on the design view of the TRANSFORMATION (2nd) query, I don't see all required fields that I'd like to add.

    My question: Ultimately, I need to have the filter (HAVING clause) = "HAVING ((([00_tbl_SourceFields].FieldStatusFromXLS)<>"N/A"))" in my transformation query. How do I integrate the HAVING clause into the 2nd query?

    Thank you,
    EEH

    P.S. Please see attached two JPGs which provide the *Design View* for both queries.
    Attached Thumbnails Attached Thumbnails Design Views.JPG  

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Modify to use 1 query
    By Thompyt in forum Queries
    Replies: 5
    Last Post: 11-08-2018, 01:11 PM
  2. Replies: 2
    Last Post: 11-24-2017, 08:55 AM
  3. Replies: 3
    Last Post: 05-24-2017, 01:26 PM
  4. Transformation from Wide to Tall
    By rigglesbee in forum Programming
    Replies: 5
    Last Post: 08-19-2014, 12:34 PM
  5. Modify a query
    By saray in forum Queries
    Replies: 2
    Last Post: 06-08-2013, 02:05 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums