Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: PL/SQL question
Buddy Wolfe <wolfe_at_gte.net> wrote:
>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
Hi,
There may be 2 possiblities why the error is generated.
Regards
N.Prabhakar Received on Fri Jan 17 1997 - 00:00:00 CST