This discussion is archived
4 Replies Latest reply: Feb 5, 2013 5:24 AM by user1767593 RSS

Why this error, Apex lovs

user1767593 Newbie
Currently Being Moderated
select apex_item.hidden (1, null) || apex_item.text(2, null)
, apex_item.text(3, null)
, null
, null
, apex_item.text(4, null)
, APEX_ITEM.SELECT_LIST_FROM_LOV(5,null,'mmi',NULL,'NO',NULL,null,null,null,'NO') as testing

from dual

this trows me an error:

[Error] Execution (6: 11): ORA-20001: Query must begin with SELECT or WITH
ORA-06512: at "APEX_040100.WWV_FLOW_ASSERT", line 289
ORA-06512: at "APEX_040100.WWV_FLOW_UTILITIES", line 6554
ORA-06512: at "APEX_040100.WWV_FLOW_ITEM", line 1265
ORA-06512: at "APEX_040100.HTMLDB_ITEM", line 480
ORA-06512: at line 1

cant figure out why.. trying it in toad. i need this for a tab. form report. so i can add new lines.
  • 1. Re: Why this error, Apex lovs
    714270 Pro
    Currently Being Moderated
    user1767593 wrote:
    select apex_item.hidden (1, null) || apex_item.text(2, null)
    , apex_item.text(3, null)
    , null
    , null
    , apex_item.text(4, null)
    , APEX_ITEM.SELECT_LIST_FROM_LOV(5,null,'mmi',NULL,'NO',NULL,null,null,null,'NO') as testing

    from dual

    this trows me an error:

    [Error] Execution (6: 11): ORA-20001: Query must begin with SELECT or WITH
    ORA-06512: at "APEX_040100.WWV_FLOW_ASSERT", line 289
    ORA-06512: at "APEX_040100.WWV_FLOW_UTILITIES", line 6554
    ORA-06512: at "APEX_040100.WWV_FLOW_ITEM", line 1265
    ORA-06512: at "APEX_040100.HTMLDB_ITEM", line 480
    ORA-06512: at line 1

    cant figure out why.. trying it in toad. i need this for a tab. form report. so i can add new lines.
    Please make sure that you have defined a LOV in your application (Shared Components -> List of Values) with the name "mmi".
    Secondly, use column aliases in your query.
  • 2. Re: Why this error, Apex lovs
    user1767593 Newbie
    Currently Being Moderated
    This is the error it throws in Apex when i run the page:

    failed to parse SQL query:
    ORA-01446: cannot select ROWID from, or sample, a view with DISTINCT, GROUP BY, etc.


    This is the whole code for my report / tab form


    select 1
    , apex_item.hidden (1, mmi.rle_nummer) ||
    apex_item.text(2, mmi.RLE_NUMMER) Extern
    , apex_item.text(3, mmi.OMSCHRIJVING) Omschrijving
    , mmi.DATUM_START
    , mmi.DATUM_EINDE
    , apex_item.text(4, mmi.GROEP) GROEP
    , apex_item.select_list_from_lov( 5, mmi.AUTO1,'LOV KLT TYPE', null, 'NO', null, null ) bla1


    , apex_item.select_list_from_lov( 6, mmi.AUTO2,'LOV KLT TYPE', null, 'NO', null, null ) bla2
    , apex_item.select_list_from_lov( 7, mmi.AUTO3,'LOV KLT TYPE', null, 'NO', null, null ) bla3
    , apex_item.select_list_from_lov( 8, mmi.AUTO4,'LOV KLT TYPE', null, 'NO', null, null ) bla4
    , mmi.INTERN
    , apex_item.checkbox (9,'IND_ONLINE', DECODE (IND_ONLINE,'J', 'CHECKED', null)) ||apex_item.md5_hidden( 50, mmi.RLE_NUMMER, mmi.OMSCHRIJVING, mmi.DATUM_START, mmi.DATUM_EINDE, mmi.GROEP, mmi.AUTO1, mmi.AUTO2, mmi.AUTO3, mmi.AUTO4 ) indonline

    from mmitabel mmi

    where mmi.RLE_NUMMER = :P11_NUMMER


    union all
    select null

    , apex_item.hidden (1, null) ||
    apex_item.text(2, null)
    , apex_item.text(3, null)
    , null
    , null

    , apex_item.text(4, null)
    , apex_item.select_list_from_lov( 5, null,'LOV KLT TYPE', null, 'NO', null, null )

    , apex_item.select_list_from_lov( 6, null,'LOV KLT TYPE', null, 'NO', null, null )
    , apex_item.select_list_from_lov( 7, null,'LOV KLT TYPE', null, 'NO', null, null )
    , apex_item.select_list_from_lov( 8, null,'LOV KLT TYPE', null, 'NO', null, null )
    , null
    , apex_item.checkbox (9, null) || apex_item.md5_hidden( 50, null )


    from dual
    connect by level <= 1


    what am i missing here? LOV KLT TYPE exsists in shared components. column aliases cant be the issue here right?

    Edited by: user1767593 on 5-feb-2013 4:20
  • 3. Re: Why this error, Apex lovs
    Howard (... in Training) Pro
    Currently Being Moderated
    Are you saying it runs in TOAD but not in APEX?
  • 4. Re: Why this error, Apex lovs
    user1767593 Newbie
    Currently Being Moderated
    no, this error : failed to parse SQL query:
    ORA-01446: cannot select ROWID from, or sample, a view with DISTINCT, GROUP BY, etc.

    is the one i got in Apex.... but after setting up a new page and copy paste of the code provided, it worked... i hate these kinds of things... looking 4 hours and the code was ok all along..

    Cheers,

    mmi

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points