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

Home -> Community -> Usenet -> c.d.o.server -> PL/SQL question

PL/SQL question

From: Buddy Wolfe <wolfe_at_gte.net>
Date: 1997/01/15
Message-ID: <32DD9CA9.12AD@gte.net>#1/1

Help...

in a normal SQL I can do the following query:

   SELECT MAX(price_tier)
   FROM state_tier
   WHERE state = 'AR'
   and dollars < 36000;

which will return one row out of a possible 8 rows.

The problem is I need to do this in PL/SQL and assign the value returned to a varible. I have tried to use GREATEST, however, I am getting an ORA-06502 PL/SQL:numeric or value error. The column price tier is VARCHAR2, but the actual values are 11, 21, 31, 41, etc.  I am assigning it to a varible v_price_tier state_tier.price_tier%TYPE.

Please email at wolfe_at_gte.net Received on Wed Jan 15 1997 - 00:00:00 CST

Original text of this message

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