Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> query help

query help

From: Chris Kempster <ckempste_at_iinet.net.au>
Date: Thu, 4 May 2000 18:43:45 +0800
Message-Id: <10487.104912@fatcity.com>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US