Skip to Content
0
Former Member
Mar 03, 2009 at 10:34 PM

How to select row with most recent date

671 Views

hi -- I need to create a selection formula that accomplishes what the following sqlplus query does:

select * from my_table where start_date_time = (select max(start_date_time) from my_table

where start_date_time < sysdate);

Essentially, I want the data that represents the most recent we have.

I can't find a way to get Crystal to do this. Either my syntax is incorrect, or I get the message that

the "maximum" formula can only be evaluated after the select.

How can I do this?

Thanks,

Carol