Re: invalid relational error, please help

From: shakespeare <whatsin_at_xs4all.nl>
Date: Sat, 5 Jan 2008 11:11:12 +0100
Message-ID: <477f57c1$0$85787$e4fe514c@news.xs4all.nl>

"Totti" <saliba.toufic.george_at_gmail.com> schreef in bericht news:497200a1-e933-418b-a5c1-db8d2b28141f_at_e10g2000prf.googlegroups.com...
> hi all i am having the following error :
>
> ORA-00920 invalid relational operator
>
> i read the quotes of other people who had the same problem but i didnt
> understand how this ties to my situation, since it is about memory and
> relative things, since the formula when working with other tables in
> my DB shows no problems at all;
>
> the formula is the following :
>
> SELECT TO_CHAR(purinv.Inv_Date,'mm')
> MONTH ,TO_CHAR(purinv.Inv_Date,'YYYY') YEAR,
> SUM(DECODE(PROD.category,'Special',prod.unit_price * sales.qty , 0))
> AS "Special",
> SUM(DECODE(PROD.category,'Base',prod.unit_price * sales.qty , 0)) AS
> "Base",
> SUM(DECODE(PROD.category,'Common',prod.unit_price * sales.qty , 0)) AS
> "Common"
> from prod, sales, purinv
> where sales.prod_code = prod.code and Prod.category ('Special',
> 'Base', 'Common')
> and purch.inv_code = purinv.code
> group by
> TO_CHAR(purinv.Inv_Date,'mm') ,TO_CHAR(purinv.Inv_Date,'YYYY')
> order by TO_CHAR(purinv.Inv_Date,'YYYY'),TO_CHAR(purinv.Inv_Date,'mm')
>
> any help appreciated

and Prod.category ('Special',
> 'Base', 'Common')

is also suspect, unless it is a boolean function. I guess you meant and Prod.category IN ('Special',
> 'Base', 'Common')

Shakespeare Received on Sat Jan 05 2008 - 04:11:12 CST

Original text of this message