3 Replies Latest reply: Feb 14, 2013 3:53 AM by Jiri N. RSS

    Problems with rowid in tabular form

    Jiri N.
      Hello experts!

      I am facing some problems in my application so I tried to reproduce my problems on apex.oracle.com to provide as much information as I can. But also there I have a problems.

      I have created page with tabular form and I would like to show the rowid in this form. But I am getting the failed to parse SQL query:
      ORA-00918: column ambiguously defined error.

      I have put on the same page a classic report which uses exactly the same SQL query as tabular fom and this classic report works.

      Could you please check and tell me what is wrong in my case?

      My test appl.

      www.oracle.apex.com
      username: kurin@centrum.cz
      workspace: kurintest
      passwd: kurintest
      appl: 107 - ROWID
      page: 2

      Thanks in advance!

      Regards,

      Jiri
        • 1. Re: Problems with rowid in tabular form
          912368
          Hello.

          Sometimes such reports and tabular forms act really strange...

          Well, I created a bunch of new tabular forms with the same table. All of them worked.
          I changed the ALIAS in the SQL-Statement of "ROWID" to "ROWID" AS "TEST_ROWID" and it worked.

          I have seen nothing special in Firebug and APEX-Views, so I don't know why it crashed.

          Hope it works.
          • 2. Re: Problems with rowid in tabular form
            Jiri N.
            Thx a lot!

            Fix with alias works!

            Jiri
            • 3. Re: Problems with rowid in tabular form
              Jiri N.
              I tried to use alias for ROWID column in my appl. (APEX 4.1.1.00.23). But I have again some problems.

              I have tried:
               SELECT "ROWID" as "TESTROWID" 
              and I get: Error Error saving column settings. ORA-01403: no data found when I try to save SQL statement
               SELECT ROWID as TESTROWID 
              and I get: failed to parse SQL query: ORA-00923: FROM keyword not found where expected when page with tab. form is loaded

              in the debug log I have found the reason:

              query could not be parsed:
              select NULL "CHECK$01", NULL "TEST_ROWID", NULL "SUBCONTRACTOR", NULL "VOLUME", NULL "TECHNOLOGYTYPECODE", NULL "SPECIESCODE", NULL "AVGTREESIZE", NULL "PRICE", to_number(:"P6110_ID") "STUCONTRSERVICEDATA_ID", NULL "ID", NULL "INSBY", NULL "INSDT", NULL "UPDBY", NULL "UPDDT" from dual union all select "CHECK$01", "TEST_ROWID", "SUBCONTRACTOR", "VOLUME", "TECHNOLOGYTYPECODE", "SPECIESCODE", "AVGTREESIZE", "PRICE", "STUCONTRSERVICEDATA_ID", "ID", "INSBY", "INSDT", "UPDBY", "UPDDT" from (select NULL "CHECK$01", "TEST_ROWID", "SUBCONTRACTOR", "TECHNOLOGYTYPECODE", "SPECIESCODE", "AVGTREESIZE", "VOLUME", "PRICE", "STUCONTRSERVICEDATA_ID", "ID", "INSBY", "INSDT", "UPDBY", "UPDDT" from ( select "ROWID" "APEX$ROWID" as "TEST_ROWID", "SUBCONTRACTOR", "TECHNOLOGYTYPECODE", "SPECIESCODE", "AVGTREESIZE", "VOLUME", "PRICE", "STUCONTRSERVICEDATA_ID", "ID", "INSBY", "INSDT", "UPDBY", "UPDDT" from "EVK"."STUCONTRSERVICEDATAROW" where "STUCONTRSERVICEDATA_ID" = :P6110_ID) APEX$RPTSRC )
              
              here is the problematic part:
              ( select "ROWID" "APEX$ROWID" as "TEST_ROWID",
              I am starting to be desperate...

              Any guess how to fix?

              Regards,

              Jiri