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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Sql Help

Re: Sql Help

From: <kishanthakker_at_gmail.com>
Date: 3 Aug 2005 02:28:52 -0700
Message-ID: <1123061332.208440.93080@z14g2000cwz.googlegroups.com>


Dear Morgan,

sorry to make you dizzy.

I apologise for my laps in communication...

You have got me right I am selecting these rows in order of fnd_code,txn_dt,txn_no.
and in WHERE clause fnd_code is compared with the required fnd code. but there could be multiple rows with txn_date so I have to select with <= operator in where clause with given date. for example

fnd_code,    txn_date      txn_no       fifo_cum_amt
aaaa          01-jan-2005       2             100
aaaa          02-jan-2005       4             250
aaaa          02-jan-2005       5             300
bbbb          01-feb-2005       1               50
bbbb          03-feb-2005       2              100
bbbb          04-feb-2005       3              150

when I select fifo_cum_amt in above view with where fnd_code = 'aaaa'
and txn_date <= '03-jan-2005'
and txn_no < 5
It should select '250'
AND
when I select fifo_cum_amt in above view with where fnd_code = 'bbbb'
and txn_date = '04-feb-2005'
and txn_no < 3
It should select '100'

How to frame the select statement Please help me.

regards

K Thakker Received on Wed Aug 03 2005 - 04:28:52 CDT

Original text of this message

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