ORA-22818: subquery expressions not allowed here
i get 'ORA-22818: subquery expressions not allowed here' when i try the following query:
I'm totally new in sql and don't know how to solve it. Thx for help.
addDefaultValue columnName="CONSTANT_EVENT_TYPE_REF" tableName="TB_INVOICE_CYCLE" defaultValueComputed="(SELECT autoid FROM tb_constants c WHERE c.id='1' AND c.constant_type_ref=(select autoid FROM tb_constant_types WHERE id ='EVENT_TYPE'))"
I would rewrite query as a join of TB_CONSTANTS and TB_CONSTANT_TYPES tables - don't see a reason for the inline view.
Originally Posted by kahfee
Pablo (Paul) Berzukov
Author of Understanding Database Administration
available at amazon and other bookstores.
Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.
Click Here to Expand Forum to Full Width