Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> PL/SQL question
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