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

Home -> Community -> Usenet -> c.d.o.tools -> Re: SQL query

Re: SQL query

From: Eric Givler <egivler_at_flash.net>
Date: Sun, 05 Nov 2000 02:15:40 GMT
Message-ID: <gp3N5.5673$pq3.426205@news.flash.net>

Create another table called ServiceLevel

   Service varchar2(5) not null
   ServiceDesc varchar2(10)

Place what each service means in that table Create a fk from order to service
Use a join in your query to get the description

Otherwise, use a decode() statement.

<tmurrayiii_at_my-deja.com> wrote in message news:8tvb8g$1ln$1_at_nnrp1.deja.com...
> Hi,
>
> I am query this table:
>
> SQL> desc order;
> Name Null? Type
> ----------------------------------------- --------
> ----------------------------
> ORDER_ID NOT NULL NUMBER(38)
> CUSTOMER_ID NOT NULL NUMBER(38)
> SERVICE NOT NULL VARCHAR2(5)
> ORDER_NUMBER NOT NULL VARCHAR2(15)
> VOLUME NOT NULL NUMBER(38)
> CHANNEL NOT NULL VARCHAR2(10)
> ORDER_DATE NOT NULL DATE
>
> The "VOLUME" field returns a 1 - 5 value. Is it possible to translate
> the returned value 1 to "low", 2 to "medium", 3 to "high" etc. in an sql
> query?
>
> Thanks
>
> Tom
>
>
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
Received on Sat Nov 04 2000 - 20:15:40 CST

Original text of this message

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