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: Return keyword from max value held in multiple columns

Re: Return keyword from max value held in multiple columns

From: DA Morgan <damorgan_at_x.washington.edu>
Date: Mon, 20 Dec 2004 16:13:36 -0800
Message-ID: <41c769b3$1_3@127.0.0.1>


Tim Frawley wrote:
> I am attempting to return a keyword of 'Novice', 'Journey' or 'Expert'
> based on dates held in three columns and the userid.
>
> The date references the day when that user achieved that level of
> competence. A sample of the data would be like:
>
> create table t_ (userid char(3),
> novice date,
> journey date,expert date)
>
> insert into t_ values ('ABC',
> to_date('10/15/2003','dd-mon-yyyy'),
> to_date('12/15/2003','dd-mon-yyyy'),
> to_date('1/15/2004','dd-mon-yyyy'))
>
> insert into t_ values ('DEF',
> to_date('1/15/2004','dd-mon-yyyy'),
> null,
> to_date('12/15/2003','dd-mon-yyyy'))
>
> insert into t_ values ('XYZ',
> to_date('10/15/2003','dd-mon-yyyy'),
> to_date('12/15/2003','dd-mon-yyyy'),
> null)
>
> My other issues are that the dates may not be Novice least to Expert
> max (just in case entry is fouled up) and the issue of nulls.
> Can anyone help me?

Probably not based on whagt you posted. For one thing your table t_, where did the name come from?, isn't relational. What school is giving this out as homework?

-- 
Daniel A. Morgan
University of Washington
damorgan_at_x.washington.edu
(replace 'x' with 'u' to respond)


-----------== Posted via Newsfeed.Com - Uncensored Usenet News ==----------
   http://www.newsfeed.com       The #1 Newsgroup Service in the World!
-----= Over 100,000 Newsgroups - Unlimited Fast Downloads - 19 Servers =-----
Received on Mon Dec 20 2004 - 18:13:36 CST

Original text of this message

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