-
Filtering on aggregated fields?
I would like to filter on aggregated fields (ex. SUM). This requires using HAVING instead of WHERE in the query. Is this possible to do using the standard AspDb filter screen? How?
Example:
1) Normal query
SELECT ArtNo, Count FROM Orders WHERE Count = 5
2) Query on aggregated field
SELECT ArtNo, Sum(Count) AS Total FROM Orders
Group BY ArtNo HAVING Total = 5
Martin Jocic
-
Answered in FAQ Q44
This question is covered in the FAQ, Q44.
Martin
------------
Martin Jocic at 9/16/99 2:48:21 PM
I would like to filter on aggregated fields (ex. SUM). This requires using HAVING instead of WHERE in the query. Is this possible to do using the standard AspDb filter screen? How?
Example:
1) Normal query
SELECT ArtNo, Count FROM Orders WHERE Count = 5
2) Query on aggregated field
SELECT ArtNo, Sum(Count) AS Total FROM Orders
Group BY ArtNo HAVING Total = 5
Martin Jocic
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|