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 Statement Help

Re: SQL Statement Help

From: Kobee <dbmdata_at_gmail.com>
Date: 18 Jul 2006 06:46:43 -0700
Message-ID: <1153230403.214317.157640@p79g2000cwp.googlegroups.com>


I'm sorry, I don't think I understand at all what you are saying. Can you please explain?

Thanks.

wannabe RAC wrote:
> Kobee,
>
> I think the best approach here might be to use pl/sql create a function
> which returns the value of the type first and pass this to a package
> procedure which then gives the required output depending output from
> the function.
>
> Sql will this type of query very difficult to manage.
> Kobee wrote:
>
> > Hi,
> >
> > I've been trying to get this SQL, but I just can't get it to work. It
> > should a be a relatively simple SELECT on a single table, with 2
> > criteria - a date range for "lastupdate". Basically it's like "give me
> > all the records from this table where the lastupdate is between
> > startdate and enddate." There's one catch, though. There are three
> > types of "transaction_types" in this table: "Add", "Update", "Delete".
> > If the type is "Update", then there will be always be 2 records, with
> > possibly different lastupdate values. The catch is that this SQL has to
> > return the second "Update" row, even if it has a lastupdate outside of
> > the specified date range. What's the best way to accomplish this?
> >
> > Thanks in advance for any help. My SQL is not up to par...
Received on Tue Jul 18 2006 - 08:46:43 CDT

Original text of this message

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