Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Referencing Aggregated Column Value in Where Clause

Christine1111Jan 6 2009 — edited Jan 6 2009
Hello -

I'm trying to determine how I can accomplish the following in the most straightforward, efficient way.

Among other things, I'm selecting the following value from my table:
max(received_date) as last_received_date
I also need to evaluate the "last_received_date" value as a condition in my where clause. However, I can't reference my aliased "last_received_date" column value, and when I try to evaluate max(received_date) in the where clause, I get the "group function is not allowed here" error.

Does anyone know of a good workaround?

Thanks,
Christine
This post has been answered by Walter Fernández on Jan 6 2009
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 3 2009
Added on Jan 6 2009
6 comments
685 views