Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> query help
Dear fellow dba's
I have a table with the following columns:
pay# (integer, p.key)
due-date (date)
Example records are:
345 1/1/1999 365 1/3/2000 456 2/8/2001
I need to write a select that gives me the months between the payments for each record, ie:
345 0 (no payment before it)
365 14
465 17
14months difference between 365 and 345 for example.
Ideas? this is not a test questio btw, i was trying to get out of writing pl/sql :) Received on Thu May 04 2000 - 05:43:45 CDT
![]() |
![]() |