Re: invalid relational error, please help
Date: Fri, 4 Jan 2008 18:44:35 -0800 (PST)
Message-ID: <9a66e953-17ee-47da-b6fa-5eb01d11ca8c@r60g2000hsc.googlegroups.com>
Thnak you Mr. Morgan for your notice;
here is the whole thing:
SQL> SELECT TO_CHAR(purinv.Inv_Date,'mm')
MONTH ,TO_CHAR(purinv.Inv_Date,'YYYY') YEAR,
2 SUM(DECODE(PROD.category,'Special',prod.unit_price * sales.qty ,
0)) AS "Special",
3 SUM(DECODE(PROD.category,'Base',prod.unit_price * sales.qty , 0))
AS "Base",
4 SUM(DECODE(PROD.category,'Common',prod.unit_price * sales.qty ,
0)) AS "Common"
5 from prod, sales, purinv
6 where sales.prod_code = prod.code and Prod.category ('Special',
'Base', 'Common')
7 and purch.inv_code = purinv.code
8 group by
TO_CHAR(purinv.Inv_Date,'mm') ,TO_CHAR(purinv.Inv_Date,'YYYY')
9 order by
TO_CHAR(purinv.Inv_Date,'YYYY'),TO_CHAR(purinv.Inv_Date,'mm');
and purch.inv_code = purinv.code
*
ERROR at line 7:
ORA-00920: invalid relational operator
Received on Fri Jan 04 2008 - 20:44:35 CST