Query doesn't work on my applicatio.

Hi everyone,
I have a trick query on my application, it goes something like this:
I have a Shuttle Item, let's call it :P7_ID, with a dynamic action that everytime the shuttle change
a page submit is triggered. Then I have this report, let's call it, employee Report, that uses the shuttle
values to do it's query. The shuttle has this values that can be selected :1,2,3,4,5 and etc...
The query of the report is this: Select * from employee where Id_employee in (replace(:P7_ID,':',','));
I use the replace command to format the returning value of the shuttle as 1,2,3, for example, because
when you select more than one value in the shuttle, it concatenates the values with a ':'.
The query is returning "report error: ORA-01722: invalid number", probably because apex
returns the value of the shuttle for the query as a string.
It is possible to fix this problem, or do you guys have an better idea to do this query?
Your help is very appreciated.
Regards, Leandro Freitas.

Hi,
Here is document Working with Multiple Select List Item. It apply also to shuttle.
http://docs.oracle.com/cd/E23903_01/doc/doc.41/e21674/bldapp_item.htm#CEGDBEHF
Regards,
Jari
My Blog: http://dbswh.webhop.net/dbswh/f?p=BLOG:HOME:0
Twitter: http://www.twitter.com/jariolai

Similar Messages

  • SQL query doesn't work in VB program

    Hi:
    The following SQL query doesn't work into a VB program, I'm using Oracle OLEDB to established connection to the DB, ... the query returns 0 rows ...
    When I run this same query from any SQL Plus, works well (returning me something like 119 rows) ...
    Any clue or hint ??
    Thanks in advanced
    Angel Castro
    SELECT OPERADOR, ID_ALIMENTADOR, RB_FSC, NUM_CTROL, COND_OPERA, TRANSITORIO, PENDIENTES, ANORMAL, EDO_REAL, IDENTIFICADOR, CAUSA
    FROM HISTORICO_OPERACION
    WHERE (FECHA BETWEEN '20-AUG-2004' AND '5-NOV-2004')
    AND (HORA BETWEEN '10:00:00' AND '16:00:00')
    ORDER BY ID_ALIMENTADOR ASC;

    Is the column FECHA of datatype DATE?
    Are you running the query with the constant date looking like strings ('20-AUG-2004' in your post, for example) as-is from the VB program?
    If not, are you binding the parameters correctly?
    What is the setting of your NLS_DATE_FORMAT parameter?
    What happens if you do a
    ALTER SESSION SET NLS_DATE_FORMAT = 'DD-MON-YYYY'from your VB program before running the query?

  • The query doesn't work

    Hi kind people!
    I have udf  TEST on the picture. The query on the picture I have connected to the field Test and conected to field description too. But with the field Description the query doesn't work. U_Producer is the name of another field. Why does not it work?

    Hi Gordon!
    From the right I have UDF for choosing the spare parts of auto.  I want to add a spare part, for example to item master data (OITM). I enter every field step by step 1 - 4 by choosing frome use tables linked in every field. I choose fielf 1 (Brand) for example TOYOTA and in the use table of 2(Model) field i see only values that belong to TOYOTA that to say corolla, carina, vista and so on.  But to find any component  exactly i put on the loupe in the field 5 and see a table where all types of auto parts in the world but they are filtered with parametrs in 1-4 fields. I chhose needed component and get in the 5 field any code of a choosed part. Then i d liked to link the table of filed 5 to field Description too and to filter component with code in field 5 in order to get item description from the use table. I used the one method of filtering in all fields Here i see that i can to filter values using use fields but I don't use it in standart field description, although the usual selection of elements of any use table works. As a result a see that the problem that doesn't work the selection and filtration in the field description but it works in in UDF.

  • Multiple conditions in Query doesn't work

    Hi all,
    I've made a query pointing on a Multiprovider wich 's made of two main dimension ( multiple infoproviders ) :
    contract and pricing and on the other hand  Sales and Revenues.
    In my Query, one condition's concerned by a contract & pricing key figures ( Number of pricing condition > 0 ), and another one is about a Minimum Turnover Sales & Revenues key Figures restriction( by a prompt ).
    This doesn't match, Some rows are missing, and while a condition is active , the other one can't be..
    If any one meet this kind of problem before ?
    Thanks and sorry for my bad english..

    Hi,
    I already try to create another key figure wich made like this :
    Number of condition * Turnover
    and made a condition on this result.
    But the main problem is  if the contract doesn't have Turnover, it will not shown the rows with condition ..( the condition is on the single value 'number of document ) and if I put anotehr condition with number of condition > 0, it still doesn't work..
    thanks for help.

  • Form on a SQL Query - doesn't work with SELECT * - bug or feature ?

    When I do this,
    Create Page -> Page with Component -> Form -> Form on a SQL Query -> SELECT * FROM EMP
    I do not get any items displayed and it creates a simple HTML region / page. Do we have to necessarily specify the column names ?
    Iam looking at a way to see if any addition of columns in the table does not involve IT intervention in recreating the form.
    When we try to create with Form on a SQL Query, then shouldn't it be similar to the Report where the same thing works, if I give SELECT function_returning_columns() from DUAL even then the same thing happens where it creates an ITEM called functions_returning_columns() it creates HTML region
    I asked a related question with no answer :-( in
    Dynamic Creation of Items in Runtime through Application UI

    Hi Marc,
    Thanks. I just tried something like this. Taking the EMP table example, (it doesn't matter which table), I created a region based on a Pl/Sql function returning SQL query
    ( I selected the vertical report template including nulls to display it like a form ) :
    DECLARE
    v_sql VARCHAR2(3000) ;
    mn_idx NUMBER := 1 ;
    BEGIN
    v_sql := 'SELECT ' ;
    FOR recs IN (SELECT * FROM ALL_TAB_COLUMNS WHERE TABLE_NAME = 'EMP' ORDER BY COLUMN_ID)
    LOOP
    v_sql := v_sql || 'HTMLDB_ITEM.TEXT(' || mn_idx || ',' ||
    recs.column_name || ') ' || recs.column_name || ', ' ;
    mn_idx := mn_idx + 1 ;
    END LOOP ;
    v_sql := SUBSTR(v_sql, 1, LENGTH(v_sql) -2) ;
    v_sql := v_sql || ' FROM EMP WHERE EMPNO = 7369 ORDER BY 1 ' ;
    RETURN v_sql ;
    END ;
    This allowed me to do my updates etc.., Then I created a button called 'Apply' and a process called 'update_changes' on button click and defined this:
    DECLARE
    v_sql varchar2(1000) ;
    mn_ctr NUMBER := 1 ;
    BEGIN
    v_sql := 'BEGIN UPDATE EMP SET ' ;
    FOR recs IN (select COLUMN_ID, COLUMN_NAME, DATA_TYPE
    from all_tab_columns where table_name = 'EMP'
    ORDER BY COLUMN_ID) loop
    -- Make changes here if required- this is assuming 9 columns --
    v_sql := v_sql || recs.column_name || ' = HTMLDB_APPLICATION.G_F0' || mn_ctr || '(1),' ;
    mn_ctr := mn_ctr + 1;
    end loop ;
    v_sql := substr(v_sql, 1, length(v_sql) - 1) ;
    v_sql := v_sql || ' WHERE EMPNO = 7369; END ;' ;
    execute immediate (v_sql) ;
    END ;
    Since this is for example, I didn't include code for Checksum and hardcoded empno = condition and have provision for 9 columns. I made some changes and tried saving it and I was able to do it.
    I altered the table to add a column / drop a column and when I relogin, Iam able to see the changes.
    Can you tell me if there could be any drawbacks in this approach ?.

  • WITH Clause query doesn't work in Oracle Reports.

    Hi Gurus,
    I'm using a WITH clause query and need to build a report using the same query.
    But when i'm trying to build a report, query is giving error as "WITH clause table or view doesn't exists".
    But the same query perfectly works in sql prompt.
    Oracle Reports doesn't supports WITH clause query?
    Please suggest.
    Thanks,
    Onkar

    I ran into a similar problem before and worked around it by moving the query to a pipelined function in the database as described at WITH clause unexpectedly causes ORA-00942 in Reports Builder
    Hope this helps.

  • Query doesn't work.

    I am declarin a cursor like this inside a pl\sql editor in Oracle Forms 6i:
    cursor customer_services is select * from Customers inner join Services on Customers.ServiceID=Services.ServiceID.
    And when i compile the followin error appears:
    Error 103:
    Encountered the symbol Join when expecting one of the following:
    If i remove the inner join the query works.I mean it doesn't accept joins.

    select * from Customers, Services where Customers.ServiceID(+)=Services.ServiceID That's an outer join.

  • [SOLVED] -- to_char (:A) = '192025ZMAR03' (in a query) doesn't work

    For custom query of a DATE (database) DATETIME (form) field
    to_char (:A) > '192025ZMAR03' or to_char (:A) <> '192025ZMAR03' or
    to_char (:A) <= '192025ZMAR03' works, BUT to_char (:A) = '192025ZMAR03' is not working :(
    Any ideas?
    iAS version is 10.1.2.0.2 , running on Linux. Related format mask is defined in the related forms column properties.
    Thank you
    Message was edited by:
    zaferaktan
    Message was edited by:
    zaferaktan

    BUT to_char (:A) = '192025ZMAR03' is not workingIt is not working for either of two reasons:
    1. The data in the database column contains a nonzero seconds time element. You are not providing one, so unless the rows have seconds set to exactly zero, the date and time are not equal.
    2. Your sessions default date format for your forms session is not DDHH24MI"Z"MONRR
    Since you do not give it a format to use, Oracle is using the default date format, which is usually DD-MON-YY.
    If you want to ignore the seconds in the time element, you need to add TRUNC(:A,'MI') to your condition, which truncates to the minute.
    To use both the correct datetime format and ignore the seconds, use this:
    to_char (trunc(:A,'MI'),'DDHH24MI"Z"MONRR') = '192025ZMAR03'However, you should NOT be converting the database data to character before doing the comparison. If you do, and you use the > or < operators, any day of the month > 19 will compare greater than your value, even 200159ZJAN03.
    The correct method would be this:
    trunc(:A,'MI') = to_date('192025ZMAR03','DDHH24MI"Z"MONRR')

  • SQL Query doesn't work coccrectly

    The table includes list of month and years.
    When I write
    SELECT MONTH,YEAR FROM MONTH_DETAILS ORDER BY YEAR DESC,MONTH DESC;
    it works correcty and returns
    MONTH YEAR
    7 2009
    6 2009
    5 2009
    4 2009
    3 2009
    2 2009
    1 2009
    12 2008
    11 2008
    But when I want to return only the first one(month=7 and year=2009) and change query like this
    SELECT MONTH,YEAR FROM MONTH_DETAILS WHERE ROWNUM=1 ORDER BY YEAR DESC,MONTH DESC;
    it returns
    MONTH YEAR
    2 2009
    what is the problem?
    Both month and year fields are defined as numbers.

    Your query should be
    SELECT MONTH
          ,YEAR
    FROM (
          SELECT MONTH
                ,YEAR
                ,ROWNUM row_num
            FROM MONTH_DETAILS
           WHERE ORDER BY YEAR DESC,MONTH DESC
    WHERE row_num  = 1; Regards
    Arun

  • InvocationService.query() doesn't work for restarted cluster member.

    Hi,
    Thank you guys for that product, I'm very pleasured with Coherence cache.
    I will try to describe the following problem with Coherence.
    Our product integrated with Coherence cache and we have discovery/communication mechanism based on
    - MemberListener - to get events about cluster member;
    - InvocationService.query() - to communicate with remote member.
    I see that when node disconnected (wire break) MemberListener works fine. And after connection repaired sometimes cluster services on node stopped or restarted.
    I tested with 2 cluster islands and push/pull wire in my network router (2 coherence members on one side and 2 members on another side). Try to repair connection and see how cache merged.
    If node cluster services restarted I see that Member.getUid() changed for local member and MemberListener works fine for all nodes. But remote nodes can't send anything with InvocationService.query() to that restarted member!!!
    InvocationService.query() always return empty result when I try to send my AbstractInvocable to these restarted members in cluster.
    Could you help?
    I think there is bug...
    Best,
    Alex

    user4366011 wrote:
    Hi,
    Thank you guys for that product, I'm very pleasured with Coherence cache.
    I will try to describe the following problem with Coherence.
    Our product integrated with Coherence cache and we have discovery/communication mechanism based on
    - MemberListener - to get events about cluster member;
    - InvocationService.query() - to communicate with remote member.
    I see that when node disconnected (wire break) MemberListener works fine. And after connection repaired sometimes cluster services on node stopped or restarted.
    I tested with 2 cluster islands and push/pull wire in my network router (2 coherence members on one side and 2 members on another side). Try to repair connection and see how cache merged.
    If node cluster services restarted I see that Member.getUid() changed for local member and MemberListener works fine for all nodes. But remote nodes can't send anything with InvocationService.query() to that restarted member!!!
    InvocationService.query() always return empty result when I try to send my AbstractInvocable to these restarted members in cluster.
    Could you help?
    I think there is bug...
    Best,
    AlexHi Alex,
    could you please post your cache configuration file? Also, is the invocation service marked to be autostarted in the config file?
    Best regards,
    Robert

  • Query doesn't work in APD, Error: column store error: fail to create scenario: [340 2048

    Hi Experts,
    We got a problem here.
    We have a query ran without any problems in RSRT. But when I try to put it as data sources(infoprovider) in APD.
    I got following error:
    column store error: fail to create scenario: [340 2048
    We are in BW731006 & ABAP731006.
    Any advise?
    Thanks in advance!
    Tengran

    Hi,
    Can you check this part in error mentioned by clicking as highlighted in red box. It will give you a correct idea about the issue ::
    Also share the detailed error with us as well.
    Best Regards,
    Arpit

  • Warranty lookup batch query doesn't work

    Hi
    I encounter a problem with warranty lookup batch query here :
    http://csp.lenovo.com/ibapp/il/WarrantyLookupBatch.jsp
    Every time i try to access this tool i get this error :
    An error occurred while processing your request.
    Reference #97.b1ef54b8.1422368820.2637a55b
    best regard

    hi
    Am i the only one who have this problem ?
    from this page :
    http://support.lenovo.com/fr/fr/warrantylookup
    I fellow the link : "Executer la requête par lots"
    Then I reach this page : http://csp.lenovo.com/ibapp/il/WarrantyLookupBatch.jsp
    with this error message :
    An error occurred while processing your request.
    Reference #97.95fa56b8.1422434472.25843ff  (Edit : => it seem that this value change)
    Can someone try this to confirm the problem from LENOVO or from me?
    best regard

  • SQL Query (PL/SQL Function Body returning SQL query) doesn't return any row

    I have a region with the following type:
    SQL Query (PL/SQL Function Body returning SQL query).
    In a search screen the users can enter different numbers, separated by an ENTER.
    I want to check these numbers by replacing the ENTER, which is CHR(13) || CHR(10) I believe, with commas. And then I can use it like this: POD IN (<<text>>).
    It's something like this:
    If (:P30_POD Is Not Null) Then
    v_where := v_where || v_condition || 'POD IN (''''''''||REPLACE(''' || :P30_POD || ''', CHR(13) || CHR(10), '','')||'''''''''')';
    v_condition := ' AND ';
    End If;
    But the query doesn't return any rows.
    I tried to reproduce it in Toad:
    select * from asx_worklistitem
    where
    POD IN (''''||REPLACE('541449200000171813'||CHR(13) || CHR(10)||'541449206006341366', CHR(13) || CHR(10), ''',''')||'''')
    ==> This is the query that does't return any rows
    select (''''||REPLACE('541449200000171813'||CHR(13) || CHR(10)||'541449206006341366', CHR(13) || CHR(10), ''',''')||'''')
    from dual;
    ==> This returns '541449200000171813','541449206006341366'
    select * from asx_worklistitem
    where pod in ('541449200000171813','541449206006341366');
    ==> and when I copy/paste this in the above query, it does return my rows.
    So why does my first query doesn't work?
    Doe anyone have any idea?
    Kind regards,
    Geert
    Message was edited by:
    Zorry

    Thanks for the help.
    I made it work, but via the following code:
    If (:P30_POD Is Not Null) Then
    v_pods := REPLACE(:P30_POD, CHR(13) || CHR(10));
    v_where := v_where || v_condition || 'POD IN (';
    v_counter := 1;
    WHILE (v_counter < LENGTH(v_pods)) LOOP
    v_pod := SUBSTR(v_pods, v_counter, 18);
    IF (v_counter <> 1) THEN
    v_where := v_where || ',';
    END IF;
    v_where := v_where || '''' || v_pod || '''';
    v_counter := v_counter + 18;
    END LOOP;
    v_where := v_where || ')';
    v_condition := ' AND ';
    End If;But now I want to make an update of all the records that correspond to this search criteria. I can give in a status via a dropdownlist and that I want to update all the records that correspond to one of these POD's with that status.
    For a region you can build an SQL query via PL/SQL, but for a process you only have a PL/SQL block. Is the only way to update all these records by making a loop and make an update for every POD that is specified.
    Because I think this will have a lot of overhead.
    I would like to make something like a multi row update in an updateable report, but I want to specify the status from somewhere else. Is this possible?

  • Why this statement doesn't work?

    I have two table job and job_status,I use Page Process try to insert records to job_status, but the select query doesn't work, it display all the job in job table didn't filtered out the job matching the query, do someone know why? Any suggestion will be appreciated!
    DECLARE
    BEGIN
    FOR x IN (
    SELECT
    JOB_SEQ,
    PRIMARY
    FROM JOB
    WHERE ((RUN_DATES like '%'||:P6_WDAY||'%')
    or (RUN_DATES like '%'||:P6_DD ||'%')
    or (RUN_DATES like ''|| 0 ||'')))
    LOOP
    INSERT INTO JOB_STATUS(JOB_SEQ, OPERATOR,RUN_DATE) VALUES
    (x.JOB_SEQ,x.PRIMARY,to_date(:P6_DATE,'YYYYMMDD'));
    END LOOP;
    END;

    ops wrong typed
    try
    DECLARE
    BEGIN
    FOR x IN (
    SELECT
    JOB_SEQ,
    PRIMARY
    FROM JOB WHERE
    ((RUN_DATES like CHR(39)||'%'||:P6_WDAY||'%'||CHR(39))
    or (RUN_DATES like CHR(39)||'%'||:P6_DD ||'%'||CHR(39))
    or (RUN_DATES like ''|| 0 ||'')))
    LOOP
    INSERT INTO JOB_STATUS(JOB_SEQ, OPERATOR,RUN_DATE) VALUES
    (x.JOB_SEQ,x.PRIMARY,to_date(:P6_DATE,'YYYYMMDD'));
    END LOOP;
    END;

  • Summation on KFG doesn't work properly

    In my query based on InfoCube I got 3 characteristics:
      Planning Date
      Date
      Planning Level
    and one Key figure
      Planned amount
    For every Planning Level on every Date there can be several plannings done on different Planning Dates. In my query I need to show only the LAST planned amount. I've done it by creating Calculated Key Figure "Last planned Amount" with Exception Aggregation "Last Value" and Reference Characteristic Planning Date. But somehow the query doesn't work the way I need it. I got wrong totals by Date.  My totals by Date doesn't sum all forecasts (see picture at http://www.ljplus.ru/img4/s/o/sokol_jasnyj/2---detailed-view.jpg) inculding only those, that are done on last date before the Date. In my query I need 48.573 LTL sum, not the 42.785 LTL

    hi,
    change ref Char to Planning Level
    perhaps it may work

Maybe you are looking for