ORA-01427: single-row subquery returns more than one row

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • santhu1
    New Member
    • Jul 2013
    • 14

    ORA-01427: single-row subquery returns more than one row

    Code:
    SELECT NB_INWARD.*,(SELECT MODIFIED_ON from nb_application_status_audit where NB_APPLICATION_STATUS_AUDIT.APPLICATION_ID = NB_INWARD.APPLICATION_ID and app_status_audit_code = ( SELECT  max(app_status_audit_code) FROM nb_application_status_audit  where NB_APPLICATION_STATUS_AUDIT.APPLICATION_ID = NB_INWARD.APPLICATION_ID ) )MODIFIED_ON_FINAL, (SELECT MODIFIED_BY_ID from nb_application_status_audit where NB_APPLICATION_STATUS_AUDIT.APPLICATION_ID = NB_INWARD.APPLICATION_ID and app_status_audit_code = ( SELECT  max(app_status_audit_code) FROM nb_application_status_audit  where NB_APPLICATION_STATUS_AUDIT.APPLICATION_ID = NB_INWARD.APPLICATION_ID ) )MODIFIED_BY_FINAL, (SELECT ISSUED_ON FROM NB_ISSUANCE WHERE NB_INWARD.APPLICATION_ID = NB_ISSUANCE.APPLICATION_ID ) ISSUED_ON , (SELECT PRODUCT_DESCRIPTION FROM NB_PRODUCT WHERE NB_INWARD.PRODUCT_CODE=NB_PRODUCT.PRODUCT_CODE ) PRODUCT_DESCRIPTION,  (NB_APPLICATION_STATUS.APPLICATION_STATUS || ' - ' || NVL(NB_APPLICATION_STATUS.REQUIREMENTS_STATUS,'No Requirements Triggered') || ' - ' ||  NVL(NB_APPLICATION_STATUS.NON_MED_STATUS,'No Non-Medicals Triggered') ||' - ' || NVL(NB_APPLICATION_STATUS.MED_STATUS,'No Medicals Triggered')) AS STATUS FROM NB_INWARD ,NB_APPLICATION_STATUS WHERE NB_INWARD.APPLICATION_ID=NB_APPLICATION_STATUS.APPLICATION_ID AND NB_INWARD.BRANCH_NAME='MU01A'
  • Rabbit
    Recognized Expert MVP
    • Jan 2007
    • 12517

    #2
    I have no idea what you're trying to do in that jumble of code but the error message is clear. It says one of your subqueries returns more than one row when that is not allowed.

    Comment

    • santhu1
      New Member
      • Jul 2013
      • 14

      #3
      thanks for ur reply rabbit.
      i try to check the query once again.

      Comment

      Working...