-
ORA-22818: subquery expressions not allowed here
Hi,
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.
-
query
the query:
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'))"
-
Originally Posted by kahfee
the query:
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.
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|