1 Reply Latest reply on Feb 22, 2013 8:03 PM by Howard (... in Training)

    Error Message


      I have a page that display a list of databases. The database names are links so when I click on the link, it takes me to a page that should have fields prepoluated with values.

      The database name is set up this way:
      Link Text: #database_name#
      Target: Page in this Application Page: 22
      Name: P22_DATABASE_ID Value:#DATABASE_ID#

      Page 22 has a process that execute this select statement:
      select a.application_name,a.vendor_name,a.vendor_info,a.bcbear_url,a.current_version,
      into :p22_application_name,:p22_vendor_name,:p22_vendor_info,:p22_bcbear_url,:p22_current_version,
      from databases d, application a, application_database_int ad
      where d.database_id = ad.database_id and
            a.application_id = ad.application_id and
            a.application_name = :p22_application_name and
            a.vendor_name = :p22_vendor_name and
            a.vendor_info = :p22_vendor_info and
            a.bcbear_url = :p22_bcbear_url and
            a.current_version = :p22_current_version and
            a.critical_flag = :p22_critical_flag and
            a.inactive_flag = :p22_application_inactive_flag and
            d.global_database_name = :p22_global_database_name and
            d.database_name = :p22_database_name and
            d.dbms_release = :p22_dbms_release and
            d.dbms_desc = :p22_dbms_desc and
            d.db_environment = :p22_db_environment and
            d.tns_port = :p22_tns_port and
            d.internal_db_id = :p22_internal_db_id and
            d.inactive_flag = :p22_inactive_flag;
      When I click on the database name I get this error message:

      ora-01403: no data found

      Any ideas?
        • 1. Re: Error Message
          Howard (... in Training)

          Hello. Wow! You are AND'ing 17 different fields. To get any data back, all 17 will have to match exactly. (And, of course, none can be NULL; you can't test for NULL with =.) I'd start with just one clause (or no clauses) in the WHERE and make sure that you get back something from that. If / when you do get some data back, then you can add a few more clauses back into the WHERE until you find the column(s) causing the problem.

          Hint: When something complex gets tricky, start with something small and make sure that works first.

          Kind regards,