Message-Id: <10538.110371@fatcity.com> From: Ruth Fouks Date: Sun, 25 Jun 2000 09:02:23 +0200 Subject: RE: SQL Query This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. ------_=_NextPart_001_01BFDE73.522AC880 Content-Type: text/plain; charset="windows-1255" Hi Pallav, Here are two possibilities to reach the rows you want, You probably have a a logical rule to put in the WHERE close according to date or value. select A.Date as OLD_DATE, A.Value as Val, B.Date as New_DATE, B.Value as New_VAl from ABC A, ABC B WHERE A.Date < B.Date and A.Value = B.Value -4 select A.Date as OLD_DATE, A.Value as Val, B.Date as New_DATE, B.Value as New_VAl from ABC A, ABC B WHERE A.Value = B.Value -4 Hope this helps, Ruth Fouks Tvuna Software Industries LTD. Petah - Tikva ISREAL 972-3-9242652/308 -----Original Message----- From: Pallav Kalva [mailto:pallav@starmedia.net] Sent: Saturday, June 24, 2000 4:04 AM To: Multiple recipients of list ORACLE-L Subject: SQL Query Hi Guys, I have a table ABC with 2 columns like Date Values ---- ------ 22-JUN-00 1 22-JUN-00 2 . . 23-JUN-00 5 23-JUN-00 6 I want the result to be OLD_DATE VAL NEW_DATE VAL -------- --- -------- --- 22-JUN-00 1 23-JUN-00 5 22-JUN-00 2 23-JUN-00 6 Is there any simpler way to do that ??? Thanks! Pallav -- Author: Pallav Kalva INET: pallav@starmedia.net Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Lists -------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru@fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). ------_=_NextPart_001_01BFDE73.522AC880 Content-Type: text/html; charset="windows-1255" Content-Transfer-Encoding: quoted-printable RE: SQL Query

Hi Pallav,

Here are two possibilities to reach the rows you = want, You probably have a a logical rule to put in the WHERE  = close according to date or value.

select A.Date as OLD_DATE, A.Value as Val, B.Date as = New_DATE, B.Value as New_VAl
from ABC A, ABC B
WHERE A.Date < B.Date
and A.Value =3D B.Value -4

select A.Date as OLD_DATE, A.Value as Val, B.Date as = New_DATE, B.Value as New_VAl
from ABC A, ABC B
WHERE A.Value =3D B.Value -4

Hope this helps,

Ruth Fouks
Tvuna Software Industries LTD.
Petah - Tikva ISREAL
972-3-9242652/308

-----Original Message-----
From: Pallav Kalva [mailto:pallav@starmedia.net]
Sent: Saturday, June 24, 2000 4:04 AM
To: Multiple recipients of list ORACLE-L
Subject: SQL Query




Hi Guys,

I have a table   ABC  with 2 columns = like

Date          = Values
----          = ------

22-JUN-00       = 1

22-JUN-00       = 2

.

.

23-JUN-00       = 5

23-JUN-00       = 6


I want the result to be 

OLD_DATE       = VAL         = NEW_DATE     VAL
--------       = ---         = --------     ---
22-JUN-00       = 1          = 23-JUN-00     5

22-JUN-00       = 2          = 23-JUN-00     6


Is there any simpler way to do that ???


Thanks!
Pallav

--
Author: Pallav Kalva
  INET: pallav@starmedia.net

Fat City Network Services    -- (858) = 538-5051  FAX: (858) 538-5051
San Diego, = California        -- Public Internet = access / Mailing Lists
---------------------------------------------------------------= -----
To REMOVE yourself from this mailing list, send an = E-Mail message
to: ListGuru@fatcity.com (note EXACT spelling of = 'ListGuru') and in
the message BODY, include a line containing: UNSUB = ORACLE-L
(or the name of mailing list you want to be removed =