Home » Developer & Programmer » Reports & Discoverer » recent date (disc 10.1.2)
recent date [message #347447] Thu, 11 September 2008 12:19 Go to next message
kimber
Messages: 10
Registered: August 2008
Location: USA
Junior Member
Hi all
In a report that i created in the disco plus, i have the following fields:

CONTRACT_NUMBER FIRM_TYPE EST_FEE SELECTION_DATE
00010               P     $10,000   7/7/2008
00010               P     $10,000    7/21/2008

What should i do to get just the recent date i.e 7/21/2008 in the above example.

Any help is greately appreciated.

Thanks
Re: recent date [message #347452 is a reply to message #347447] Thu, 11 September 2008 12:32 Go to previous messageGo to next message
Littlefoot
Messages: 20892
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
I don't speak Discoverer, but - if it can help - use it.

In SQL*Plus, you'd use the MAX function as
SELECT contract_number, firm_type, est_fee, selection_date
FROM some_table
WHERE selection_date = (SELECT MAX(selection_date)
                        FROM some_table
                       )
Re: recent date [message #347473 is a reply to message #347447] Thu, 11 September 2008 17:25 Go to previous messageGo to next message
Viffer06
Messages: 3
Registered: July 2008
Location: Los Angeles, CA
Junior Member
kimber wrote on Thu, 11 September 2008 12:19
Hi all
In a report that i created in the disco plus, i have the following fields:

CONTRACT_NUMBER FIRM_TYPE EST_FEE SELECTION_DATE
00010               P     $10,000   7/7/2008
00010               P     $10,000    7/21/2008

What should i do to get just the recent date i.e 7/21/2008 in the above example.

Any help is greately appreciated.

Thanks


Set a date condition for SELECTION_DATE.

Under Condition: Select column Selection_date.

It should look like this:

Selection_date = to_date('7/21/2008,'MM/DD/YYYY')


That should work. If it doesn't, you'll need to do this trunc(selection_date) = to_date('7/21/2008,'MM/DD/YYYY').



Re: recent date [message #347513 is a reply to message #347473] Fri, 12 September 2008 00:08 Go to previous messageGo to next message
Littlefoot
Messages: 20892
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
OK, if that's the principle. But it means that the user has to KNOW the most recent date and, somehow, I believe that this should not be left to the user but selected programatically. Once again, I have no idea how it is supposed to be done in Discoverer, but I'm quite certain that there *must* be some way, different from the hard-coded date value.
Re: recent date [message #348613 is a reply to message #347513] Wed, 17 September 2008 07:30 Go to previous message
aarti81
Messages: 235
Registered: December 2007
Location: USA
Senior Member
Thank you all very much, i did like what you guys said and then in disco plus i used a condition . Thank you all again
Previous Topic: How to suppress the error message!
Next Topic: Pass Record Group from Forms 10g to Report 10g
Goto Forum:
  


Current Time: Mon Dec 05 02:47:52 CST 2016

Total time taken to generate the page: 0.04457 seconds