Results 1 to 3 of 3

Thread: Can you Filter When SQL statement builds aggegates in EP?

  1. #1
    Ralph Clark Guest

    Can you Filter When SQL statement builds aggegates in EP?

    I am using ASP_db EP. My SQL query builds aggregates (Sums) Grouped BY a set of ID fields (add up that values for each distinct ID). When I FILTER on the ID (even when renamed by dbNameMap and dbDisplayLookUpList and dbFilterDropFlds) the filter works. When I try to Filter on the fields holding the aggregate values, I get an ODBC Error "Invalid Column" which is the renamed aggregate column.

    (SQL7, ODBC DSN)

    Example:

    MyDB.dbSQL =

    Select Downtime_ID, Count(Distinct DowntimeCode) AS Occurrences From Downtime where Machine_id = 2 Group BY Downtime_ID

    Filtering on Downtime_id works, Filtering on "Occurrences" fails.

    What am I missing? Seems that ASP_db should handle something this mundane. Should be evident I am nit an expert.

    So HELP!

  2. #2
    FK Guest

    Can you Filter When SQL statement builds aggegates in EP? (reply)

    Look at the 4th field of NameMap. Problem might be there !

    FK






    ------------
    Ralph Clark at 9/15/99 3:36:01 PM

    I am using ASP_db EP. My SQL query builds aggregates (Sums) Grouped BY a set of ID fields (add up that values for each distinct ID). When I FILTER on the ID (even when renamed by dbNameMap and dbDisplayLookUpList and dbFilterDropFlds) the filter works. When I try to Filter on the fields holding the aggregate values, I get an ODBC Error "Invalid Column" which is the renamed aggregate column.

    (SQL7, ODBC DSN)

    Example:

    MyDB.dbSQL =

    Select Downtime_ID, Count(Distinct DowntimeCode) AS Occurrences From Downtime where Machine_id = 2 Group BY Downtime_ID

    Filtering on Downtime_id works, Filtering on "Occurrences" fails.

    What am I missing? Seems that ASP_db should handle something this mundane. Should be evident I am nit an expert.

    So HELP!

  3. #3
    FK Guest

    Can you Filter When SQL statement builds aggegates in EP? (reply)

    Check FAQ Q44....


    ------------
    Ralph Clark at 9/15/99 3:36:01 PM

    I am using ASP_db EP. My SQL query builds aggregates (Sums) Grouped BY a set of ID fields (add up that values for each distinct ID). When I FILTER on the ID (even when renamed by dbNameMap and dbDisplayLookUpList and dbFilterDropFlds) the filter works. When I try to Filter on the fields holding the aggregate values, I get an ODBC Error "Invalid Column" which is the renamed aggregate column.

    (SQL7, ODBC DSN)

    Example:

    MyDB.dbSQL =

    Select Downtime_ID, Count(Distinct DowntimeCode) AS Occurrences From Downtime where Machine_id = 2 Group BY Downtime_ID

    Filtering on Downtime_id works, Filtering on "Occurrences" fails.

    What am I missing? Seems that ASP_db should handle something this mundane. Should be evident I am nit an expert.

    So HELP!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •