![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
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 |
#3
| |||
| |||
|
|
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 |
#4
| |||
| |||
|
|
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 |
#5
| |||
| |||
|
|
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 |
#6
| |||
| |||
|
#7
| |||
| |||
|
#8
| |||
| |||
|
#9
| |||
| |||
|
#10
| |||
| |||
|
|
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_pric e * 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 |
![]() |
| Thread Tools | |
| Display Modes | |
| |