SQL Statement ignored performing List of Values query

Hi, New user just learning the basics. I have created a simple table PERSON with columns, ID, firstname, lastname, phone, city, State_ID
Then clicked create Lookup table - State_Lookup with columns State_ID and State_Name.
I create a page, include all columns from PERSON. For State the field is a select list that should do a lookup form the STATE_LOOKUP table. (I have entered 4 states in the table)
I am getting the following error however:
Error: ORA-06550: line 1, column 14: PL/SQL: ORA-00904: "STATE_ID": invalid identifier ORA-06550: line 1, column 7: PL/SQL: SQL Statement ignored performing List of Values query: "select STATE_ID d, STATE_ID v from STATE_ID_LOOKUP order by 1".
I have not entered any sql, just selected all of my options using defaults and dropdowns. What is causing the error and what do I need to change?
Thanks

Okay, learned something: The database link name used, must not contain a dash. The DB_DOMAIN is appended automatically when you create a DB link, so if IT contains a dash, the db link name does as well. Check DBA_DB_LINKS to make sure you don't hit this well-hidden feature.
Regards
Martin Klier
[http://www.usn-it.de|http://www.usn-it.de]

Similar Messages

  • Error: ORA-01722: invalid number performing List of Values query.

    when i created a cascading select list, For the first time it worked properly then little later
    it is giving this error.
    Error: ORA-01722: invalid number performing List of Values query: "select distinct cl_name d, cl_no r from Kclient where gr_no = :P1_GRNO order by 1
    could any one please solve the problem?
    2. when i run the application. in all the items edit button is automatically seen
    including in the login screen.
    could any one identify what is the error and give me a solution.

    Is this better?
    select DISTINCT FIRST_NAME||' '||LAST_NAME display_value
          , ROW_ID return_value
      from "PSA_RESOURCE_MANAGER"
    where PSA_RESOURCE_MANAGER.ACTIVE_FLAG='Y'
       AND :P117_REPORTING_MANAGER = PSA_RESOURCE_MANAGER.REPORTING_MANAGER
       AND :P117_REPORTING_MANAGER <> -1 order by 1or
    select DISTINCT FIRST_NAME||' '||LAST_NAME display_value
          , ROW_ID return_value
      from "PSA_RESOURCE_MANAGER"
    where PSA_RESOURCE_MANAGER.ACTIVE_FLAG='Y'
       AND :P117_REPORTING_MANAGER = PSA_RESOURCE_MANAGER.REPORTING_MANAGER
       AND :P117_REPORTING_MANAGER != '-1' order by 1Is ROW_ID a column in your table by the way? If not, you should use ROWID (without the underscore)

  • ORA-01722: invalid number performing List of Values query

    I have a situation here where I want to pass string value(available in search field) to POP up key LOV on another page as default value.
    I passed item value in default field in POPup key LOV item.I am able to see string value but It also gave me following error.
    Error: ORA-01722: invalid number performing List of Values query: "select CUSTOMER_NAME, CUSTOMER_ID from (select customer_name, customer_id from hed_customers) wwvlovinlineviewname where CUSTOMER_ID = :WWV_LOV_RETURN_KEY_UTIL_1111".
    Without Default value, it work like champ.
    Please suggest how to get rid of this error
    Thanks in advance

    I hit the same problem.
    The thing is that, in APEX, a 'null' value in a form is not really null but gets passed on as '%'.
    When that gets compared to a number, 01722 will occur.
    A workaround is to define a 'value if null' that is an implicit number, like '-1'.
    And lets hope no one ever uses that as a real ID...
    Cheers
    Peter

  • Retrieve Crystal SQL statements without first submitting parameter values?

    Hi,
    I am retrieving SQL statements for Crystal reports without issue, but a large number of our reports have parameters and for these the following error is thrown when I try to retrieve the SQL statement via RAS using getSQLStatement():
    com.crystaldecisions.sdk.occa.report.lib.ReportSDKServerException: Missing parameter values.---- Error code:-2147217394 Error code name:missingParameterValueError
    I have a large number of reports I'd like to pull SQL for, so it's not feasible to have my script push parameter values to each and every report.  Is there a way to retrieve SQL statements without first pushing parameter values?
    Thanks

    Hello Jeremy.
    I found a Knowledge Base article that deals with the "Error code:-2147217394 Error code name:missingParameterValueError" error that you mention.  Perhaps you could take a look at the following KBase Article in the Service MarketPlace and see if any of it applies to your situation:
    KBase number: 1420593
    I also found KBase number "1420501 - Report parameters ignored when set by Java post processing code" that seems to deal with the same problem.
    Regards.
    - Robert

  • Error: PL/SQL statement ignored

    In the code below i am getting 3 errors:
    a. PL/SQL statement ignored
    b. PLS-00201
    c. PL/SQL: ORA-00904 : invalid identifier
    please help. thank you
    =========================================
    Package body:
    =========================================
    create or replace package BODY manage_students
    as
         procedure find_sname
         (i_student_id IN student.student_id%TYPE,
         o_first_name OUT student.first_name%TYPE,
         o_last_name OUT student.last_name%TYPE)
         IS
         v_student_id student.student_id%TYPE;
         BEGIN
              select first_name, last_name
                   into o_first_name, o_last_name
                   from student
                   where student_id = i_student_id;
         exception
              when others
              then
                   DBMS_OUTPUT.PUT_LINE('Error in finding student_id: '||v_student_id);
         end find_sname;
         function id_is_good
         (i_student_id in student.student_id%TYPE)
              return BOOLEAN
         IS
              v_id_cnt number;
         begin
              select count(*)
                   into v_in_cnt
                   from student
                   where student_id = i_student_id;
              return 1 = v_id_cnt;
         EXCEPTION
         when others then
              return FALSE;
         end id_is_good;
    END manage_students;
    =========================
    Package specification:
    =========================
    set serveroutput on
    create or replace package manage_students
    as
         procedure find_sname
              (i_student_id IN student.student_id%TYPE,
              o_first_name OUT student.first_name%TYPE,
              o_last_name OUT student.last_name%TYPE
         function id_is_good
         (i_student_id IN student.student_id%TYPE)
              RETURN BOOLEAN;
    END manage_students;
    Edited by: [email protected] on Mar 19, 2009 6:03 AM
    Edited by: [email protected] on Mar 19, 2009 6:03 AM

    Congrats, someonElse! ;-)
    And about the when others: read about it on asktom why it's a bad practice, here's an example:
    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:1509245700346768268#1535781400346575552
    I've spent myself way too much time on finding and fixing bugs caused by 'when others', so I always comment about it too ;-)
    Edited by: hoek on Mar 19, 2009 2:14 PM
    Edited by: hoek on Mar 19, 2009 2:18 PM

  • Error message "SQL Statement ignored" while try to run an Funtion in APEX

    Hello All,
    In order to creating an application in APEX from CSV format i need to run below funtion.
    CREATE OR REPLACE FUNCTION bcl_custom_auth (
    p_username IN VARCHAR2,
    p_password IN VARCHAR2)
    RETURN BOOLEAN IS
    BEGIN
    FOR c1 IN (SELECT 1
    FROM bcl_employees
    WHERE UPPER(userid) = UPPER(p_username)
    AND UPPER(last_name) = UPPER(p_password))
    LOOP
    RETURN TRUE;
    END LOOP;
    RETURN FALSE;
    END;
    but i am getting below error message:
    Error at line 6: PL/SQL: SQL Statement ignored
    4. RETURN BOOLEAN IS
    5. BEGIN
    6. FOR c1 IN (SELECT 1
    7. FROM bcl_employees
    8. WHERE UPPER(userid) = UPPER(p_username)
    Could some body please check as i am new to PLSQL.
    Thanks & regards,
    Souvik Ghosh

    843873 wrote:
    Hello Edstevens,
    I did not understand your answer .Could you please elaborate.
    Thanks & regards,
    Souvik Ghosh
    Edited by: 843873 on Jul 8, 2011 11:43 PMNotice that the message had been edited? I changed my mind from my original, shot-from-the-hip, mesage, and simply deleted the entire content. would have preferred to delete the entire message but can't.

  • Error in Trigger (PL/SQL: SQL Statement Ignored)

    Here is the trigger:
    CREATE OR REPLACE TRIGGER DRUGREPLACEMENT
    AFTER INSERT ON PHARMACEUTICALS
    REFERENCING NEW AS newDrugs
    FOR EACH ROW
    WHEN (newDrugs.drugname = newDrugs.genericname)
    BEGIN
    UPDATE prescription
    SET pharmaceuticalid = newDrugs.drugID
    WHERE pharmaceuticalid IN(SELECT pharmaceuticalid FROM prescription, pharmaceuticals WHERE drugid = pharmaceuticalid AND newDrugs.genericname = pharmaceutical.genericname);
    END;
    Error is:
    Error(2,1): PL/SQL: SQL Statement ignored
    Error(3,24): PL/SQL: ORA-00904: "NEWDRUGS"."DRUGID": invalid identifier
    pharmaceuticalid is a number in my prescription table.
    drugid is a number; genericname and drugname are both varchars in my pharmaceuticals table. Any idea why I am getting these errors? (I tried putting quotes around newdrugs.drugid but then it just said "newdrugs.drugid" is invalid. Thanks for your help
    -Brian

    One more thing. Your trigger is selecting from triggering table. So single row inserts will work, but multiple row inserts into PHARMACEUTICALS will fail with famous "table is mutating" error. There is no need to select from PHARMACEUTICALS. Change:
    UPDATE ************
    SET pharmaceuticalid = newDrugs.drugID
    WHERE pharmaceuticalid IN(SELECT pharmaceuticalid FROM ************, pharmaceuticals WHERE drugid = pharmaceuticalid AND newDrugs.genericname = pharmaceutical.genericname);to
    UPDATE ************
      SET pharmaceuticalid = newDrugs.drugID
      WHERE pharmaceuticalid IN (
                                 SELECT pharmaceuticalid
                                   FROM ************
                                   WHERE drugid = :newDrugs.pharmaceuticalid
                                     AND :newDrugs.genericname = pharmaceutical.genericname
                                );SY.

  • Join query in a dynamic list of values query

    I have a join query in a dynamic list of values query. The value does not return a text value, but rather the id value.
    Is it possible to use a join query in a dynamic list of values query?
    For example...in the below query, I expect to see ename in the drop down list, but I see class_emp_id.
    select b.ename d, a.class_emp_id r
    from class_emp a, emp b
    where a.class_cat_id = :CURR_CLASS_CAT_ID
    and a.emp_id = b.emp_id
    order by 1
    Thanks,
    Reid

    :CURR_CLASS_CAT_ID is a number datatype.
    I think the problem is with the ARF. Whenever I change the dynamic LOV query to exclude the :CURR_CLASS_CAT_ID (a passed in session variable), the drop down shows all the text names I am looking for; albeit, too many since I am excluding the :CURR_CLASS_CAT_ID.
    The page I am having the problem with is a popup that is called from a report link on another page. When I show the session variables on the popup page, it shows values for only 1 of the 3 session variables I am passing to this page.
    I am using the javascript:popUp2 syntax when I call the popup page from the report link.
    As I said previously, I am passing 3 parms and only the 1st parm is getting a value. Yes, there are values for all three parms in the record of the report.
    Is there a limit to the number of variables (itemNames) that can be passed to the popup using this method?

  • How do I use SQL statements to perform calculations with form fields????

    Please help!!! I don't know how to use a SQL statement within my APEX form......
    My form is below. The user will enter the values in the form. Click on Submit. Then we need to run a SQL select statement with those values.
    Our form looks like this:
    Start_Date ____________
    Per_Period ____________
    Period ____________
    [Submit Button]
    The user will enter these 3 values in the form.
    This is an example of an user providing the values:
    Start_Date 03/14/08_______
    Per_Period $200.00________
    Period 4____________
    [Submit Button]
    Then they will click the Submit Button.
    The SQL statement (BELOW) returns output based on the users selections:
    START_DATE PER_PERIOD PERIOD
    14-MAR-2008 00:00 200 Week 1 of 4
    21-MAR-2008 00:00 200 Week 2 of 4
    28-MAR-2008 00:00 200 Week 3 of 4
    04-APR-2008 00:00 200 Week 4 of 4
    Total 800
    This is the full text of the SQL that makes the output above:
    with criteria as (select to_date('03/14/08', 'mm/dd/rr') as start_date,
    4 as periods,
    'Week' as period,
    200 per_period from dual),
    periods as (select 'Week' period, 7 days, 0 months from dual
    union all select 'BiWeek', 14, 0 from dual
    union all select 'Month', 0, 1 from dual
    union all select 'ByMonth', 0, 2 from dual
    union all select 'Quarter', 0, 3 from dual
    union all select 'Year', 0 , 12 from dual
    t1 as (
    select add_months(start_date,months*(level-1))+days*(level-1) start_date,
    per_period,
    c.period||' '||level||' of '||c.periods period
    from criteria c join periods p on c.period = p.period
    connect by level <= periods)
    select case grouping(start_date)
    when 1 then 'Total'
    else to_char(start_date)
    end start_date,
    sum(per_period) per_period,
    period
    from t1
    group by rollup ((start_date, period))
    THANKS VERY MUCH!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

    You're just doing a parameterized report, where the input fields are your parameters.
    Check out the Advanced Tutorial titled Parameterized Report here:
    http://download.oracle.com/docs/cd/E10513_01/doc/appdev.310/e10497/rprt_query.htm#BGBEEBJA
    Good luck,
    Stew

  • Invalid Table Name SQL ReporError From Unsubmitted List of Value Table Name

    I have an application in which a user selects a table name from a list of values and a SQL report shows data from the table selected. On entry into this page the "invalid table name" error shows until you select a table name.
    My list of values is a LOV with redirect.
    Is there any way to remove this error or not show the report?
    Any help is appreciated.
    Thanks,
    Kyle

    I resolved my issue by doing the following:
    Create a process
    Process Point - On Load - Before Header
    Run Process - Once Per Session or When Reset
    Process Source:
    (item in list of value set equal to return value in list of value)
    :P10_VERSION := 'ALLVERSIONS';

  • Cascading List of Values & Query Panel

    Hello all! ADF BC JDev 11
    I should use Cascading List of Values in Search Query Panel. I build CLOV like in this sample http://www.oracle.com/technology/obe/obe11jdev/11/adfbc_new_features/adfbc.html .
    But when i use it in Search Query Panel it does not work. :(((
    I thik that i need to set partial triger on detail LOV field. How can i do that?
    Help!
    Edited by: Victor_V_S on 23.11.2009 7:45

    Hello,
    Thanks for a nice solution.
    I have a similar situation.
    I have a query panel with auto make name list of values returning make as name and make id into the hidden view attribute.
    Based on this, i have another list of values namely auto model which is also a name field returning a name and id(hidden).
    I tried choosing the auto model name field and editing dependencies as auto make id and later auto make name as well.
    But i get this error in the Weblogic Log every time i selected the auto make LOV or auto model LOV and auto model does not filter based on auto name .
    <SimpleSelectOneRenderer><_getSelectedIndex> Could not find selected item matching value "SomeNameViewCriteria" in QueryRenderer$2[UIXEditableFacesBeanImpl, id=null]
    I have no clue how to handle this.
    Any help is greatly appreciated.
    Thanks.

  • ORA-06550: line 1, column 17: PL/SQL: ORA-00936: missing expression ORA-06550: line 1, column 9: PL/SQL: SQL Statement ignored

    Here is tthe code:
    begin
    declare
      p varchar2(32767) := null;
      l_clob clob;
      l_length number := 1;
    begin
    p:=p||'F|#OWNER#:QS_SPECIFICHHNO:P2_HHNO:HHNO';
    wwv_flow_api.create_page_process(
      p_id     => 1223125545905315 + wwv_flow_api.g_id_offset,
      p_flow_id=> wwv_flow.g_flow_id,
      p_flow_step_id => 2,
      p_process_sequence=> 1,
      p_process_point=> 'AFTER_SUBMIT',
      p_process_type=> 'DML_FETCH_ROW',
      p_process_name=> 'Fetch Row from QS_SPECIFICHHNO',
      p_process_sql_clob => p,
      p_process_error_message=> 'Unable to fetch row.',
      p_process_success_message=> '',
      p_process_is_stateful_y_n=>'N',
      p_runtime_where_clause=>'WHERE ( ( (HHNO) = P2_HHNO ) )',
      p_process_comment=>'');
    end;
    null;
    end;
    I execute it as follows in SQL Developer:
    select * from QS_SPECIFICHHNO
    WHERE ( ( (HHNO) = &P2_HHNO ) )
    No problem:  I receive exactyl one row in my result set which is what I expect.
    I think (definitely correct me if I am wrong)  Apex is complaining about the following line of code:
    p:=p||'F|#OWNER#:QS_SPECIFICHHNO:P2_HHNO:HHNO';
    It is complaining about a missing expession line 1 ccolumn 9  -   |#OWNER#:
    This is an Automatic Fetch query.  P2_HHNO is a simple text field where the user enters a primary key value (Household Number)
    The household number is used in the where clause of the QS_SPECIFICHHNO view.
    Here is the view:
    CREATE OR REPLACE FORCE VIEW "CASETRANS"."QS_SPECIFICHHNO" ("HHNO","CNAME","PDATE","TDATE","AGE","INWORKNO","ONWORKNO","ONCPS","ONYTHSRV","CPA","TMSUCCESS","VOL","D_N","DLQ","TRU","VPA","PA5","PA46","CPC","COOHPA4","COOHPA5","KINPA5","KINPA4","COOH","CKIN") AS
      SELECT HHNO,
             CNAME,
             PDate,
             TDate,
             msaccess_utilities.datediff('d', PDate, TDate, 0) Age,
             InWorkNo,
             OnWorkNo,
             OnCPS,
             OnYthSrv,
             CPA,
             TmSuccess,
             Vol,
             D_N,
             DLQ,
             TRU,
             VPA,
             PA5,
             PA46,
             CPC,
             COOHPA4,
             COOHPA5,
             KINPA5,
             KINPA4,
             COOH,
             CKIN
        FROM CaseTransfers
        ORDER BY CaseTransfers.HHNo,
                 CaseTransfers.PDate DESC

    'F|#OWNER#:QS_SPECIFICHHNO:P2_HHNO:HHNO'
    Is perfectly valid, it is an APEX DML string
    F = Fetch
    #OWNER# = the schema from the workspace
    QS_SPECIFICHHNO = the table/view
    P2_HHNO = The APEX item to match with the key
    HHNO = The key in the table/view
    The p_runtime_where_clause appears to be invalid;
    a) The "WHERE" keyword is not necessary, also it should be '&P2_HHNO.' not '&P2_HHNO'
    b) The record should have already matched using the DML string
    Try deleting the runtime_where_clause, it should then work.
    regards,

  • Error(11,1): PL/SQL: SQL Statement ignored

    FUNCTION getName ( theSSN IN NUMBER ) RETURN VARCHAR2
    IS
    theTotal NUMBER;
    theName VARCHAR2(40);
    s varchar2(10);
    BEGIN
    select count(*) into theTotal from employee where SSN = theSSN;
    if (theTotal = 0) then
    RETURN('');
    else
    select sex as s, (FName || ' ' || Lname) into theName
    from employee
    where SSN = theSSN;
    if s='f' then
    RETURN (theName);
    end if;
    end if;
    endI should how to write this line. Thank!

    Hi,
    Try to modify next in bold :
    FUNCTION getName ( theSSN IN NUMBER ) RETURN VARCHAR2
    IS
    theTotal NUMBER;
    theName VARCHAR2(40);
    s varchar2(10);
    BEGIN
    select count(*) into theTotal from employee where SSN = theSSN;
    if (theTotal = 0) then
    RETURN('');
    else
    select sex <s>as s</s>, (FName || ' ' || Lname)
    into s, theName
    from employee
    where SSN = theSSN;
    if s='f' then
    RETURN (theName);
    else
    RETURN('');
    end if;
    end if;
    endNicolas.

  • How to dynamically create sql statement for Defaulting Segment Values?

    Hi,
    Navigation:
    1) Descriptive/Segments
    2) Query for DFF to be modified
    3) Uncheck “Freeze Flexfield Definition”
    4) (B) Segments
    5) Segments Summary form opens
    6) (B) open - Segments form opens
    Now, here I want to specify Default type as "SQL Statement" and in the default value field I want to use SQL statement with parameters (to evaluate the default value).
    The parameters should be pass at runtime from the form in which we have this DFF. The parameters value should be one of the values which get evaluated at runtime in the form window.
    Please suggest how we can achieve this?
    Or is there any alternative to achieve this?
    Thanks!!
    Regards,
    Narender
    Edited by: Narender Singh on Mar 30, 2010 7:47 AM
    Edited by: Narender Singh on Mar 30, 2010 7:48 AM

    Jason,
    it is possible, though not so simple as with a report.
    What you need to do is to create a pipelined function, that returns your date and count data. This pipelined function can be the base of a pseudo-table, which can be used in a select. For the pipelined function you need to define types for one row and a table to define the return-type for your function:
    create or replace type calendar_row as object (date_time date, description varchar2(250));
    create type calendar_table as table of calendar_row;
    Then you can create the package with the function:
    ================================================
    create or replace package dyn_calendar is
    procedure set_query(i_query in varchar2);
    function view_source return calendar_table pipelined;
    end;
    create or replace package body dyn_calendar is
    v_query varchar2(100) := null;
    procedure set_query(i_query in varchar2) is
    begin
    v_query := i_query;
    end;
    function view_source return calendar_table pipelined is
    TYPE cursor IS REF CURSOR;
    c_cal cursor;
    v_date_time date := null;
    v_description varchar2(100) := null;
    r_cal calendar_row;
    begin
    open c_cal for v_query;
    fetch c_cal into v_date_time, v_description;
    loop
    exit when c_cal%notfound;
    r_cal := calendar_row(v_date_time, v_description);
    pipe row(r_cal);
    fetch c_cal into v_date_time, v_description;
    end loop;
    return;
    end;
    end;
    ================================================
    Now you can set query in a PL/SL region before the calendar:
    dyn_calendar.set_query(SELECT count(*), ' || :P8_SOURCE_DATE || ' FROM ' || :P8_SOURCE_TABLE || ' GROUP BY ' || :P8_SOURCE_DATE);
    and you can base your calendar on the query:
    select * from table(dyn_calendar(view_source))
    Good luck,
    Dik

  • How to get SQL statement from (Collection) query.execute();

    We have a JDO Persistence class ClassName that execute query using following code. After this statement get executed, record does not get updated in the DB. Is there a way to check what SQL statement got submitted in the (Collection) query.execute(); ??? <br><br>
    Extent extent = pm.getExtent(ClassName.class, false); <br>
    Query query = null; <br>
    try { <br>
    query = pm.newQuery(extent, filter); <br>
    Collection results = (Collection) query.execute();<br>
    Iterator i = results.iterator();<br>
    if (i.hasNext()) {<br>
    ...<br>
    }<br>

    You can always find out the names of tables that are views, using java.sql.DatabaseMetaData and its getTables() method.
    This tends to be a nice source of examples:
    javaalmanac.com
    However, if you're asking for the underlying SQL used to CREATE VIEW, I don't see anything in the API that will give you that. After all, JDBC shouldn't have to know if it's dealing with an ordinary table or a view. I think you'd have to ask your DBA for the underlying SQL.
    Once you have it, what do you plan to do with it?
    %

Maybe you are looking for

  • Freeview digital TV on Qosmio G30

    I understand many of you are experiencing the problem of digital tv freezing. I too have contacted Toshiba who act is if the don't know the problem exists and try to blame Microsoft. I saw one of you had some rather feeble feedback from Toshiba sayin

  • Cisco Phone VPN

    Probably a stupid question, but if you connfigure a Cisco VoIP phone for SSL VPN, does it provide VPN connectivity to the switch port on the back of the phone? Would a laptop connected to it get corporate access?

  • Receiving Group Text : How do i see who else is in the distribution list???

    Receiving Group Text : How do i see who else is in the distribution list??? other phones seem to have this, how can i see this?  Post relates to: Pre p100eww (Sprint)

  • Can't Open OS X Server with Windows 7

    Hello all, I'm running the latest version of Snow Leopard Server. Up until now, all of my employees in my small design shop have used Macs, so no problems. I now have an employee using Windows 7 and we cannot get her on to our server. Under Networks

  • ACR 4.6 Nikon D90 vs Nikon  VIEW NX colors/exposure/brightness

    Went from a D80 to a D90. Downloaded ACR 4.6 and all of the beta camera profiles for the D90 a month ago or so. When I view my NEF's in Nikon View NX the colors/exposure is fine. When I view them for the D90 in ACR, they are a little washed out. When