DBAsupport.com Forums - Powered by vBulletin
Results 1 to 3 of 3

Thread: ORA-22818: subquery expressions not allowed here

  1. #1
    Join Date
    Mar 2012
    Posts
    2

    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.

  2. #2
    Join Date
    Mar 2012
    Posts
    2

    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'))"

  3. #3
    Join Date
    Mar 2007
    Location
    Ft. Lauderdale, FL
    Posts
    3,555
    Quote Originally Posted by kahfee View Post
    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
  •  


Click Here to Expand Forum to Full Width