ByteArray error in a simple query.

I've inherited an application that I'm working on migrating
to CF7. It works on the testing server, but does not work on the
production server, so I suspect that this is a server configuration
issue. CF product version: 7,0,2,142559
The problem:
I'm looping through a query, running a query on each row, and
trying to display the results. The subquery keeps throwing a
"ByteArray objects cannot be converted to strings." error. This
only happens on the new production server (which has been causing
problems anyway). I've tried using CFQUERYPARAM, but that throws a
"Invalid data [B@1bef393 for CFSQLTYPE CF_SQL_CHAR" error. The
database is MS SQL, and the ClassKey column is a uniqueidentifier.
I've been working on this for several hours, now, so any
helpful tips -- or even better, solutions! -- would be terrific.

Never mind; it's a database issue.

Similar Messages

  • Error in the simple Query

    Dear Experts,
    Not able to Execute this simple query :
    Select T1.JobID , T1.BudgetValue,T1.ActualValue FROM [dbo].[Enprise_JobCost_ActualBudgetView] T1 WHERE T1.TransType = '[%0]'
    Regards

    Hello,
    View - A View in simple terms is a subset of a 'virtual table. It can be used to retrieve data from the tables, Insert, Update or Delete from the tables. The Results of using View are not permanently  stored in the database.
    Stored Procedure -  A stored procedure is a group of SQL statements which can be stored into the database and can be shared over the netwrok with different users.
    http://www.geekinterview.com/question_details/65914
    Better make a UDT for your requirement.
    Thanks
    Manvendra Singh Niranjan

  • Simple query ... syntax error ?

    What is wrong with this simple sql statement ?
    SELECT Caseid
    FROM (SELECT DISTINCT Caseid, userid FROM Atts)
    I get this error
    Server: Msg 170, Level 15, State 1, Line 2
    Line 2: Incorrect syntax near ')'.

    In this case, it could go either way. Because the derived
    table is
    performing the select distinct anyway, the execution plans
    would be similar,
    but you'd see one extra step for selecting all rows from the
    derived table.
    Notice that the derived table has distinct caseid, userid,
    but the main
    query only selects caseid. If the extra IO required to
    transmit the
    unwanted userid column is more expensive than the extra step
    required to
    select just the caseid column out of the derived table, then
    the derived
    table is the better choice.
    In any case, the simpler query is usually the better option.
    Unless he
    actually wants a duplicate caseid for each userid, but not
    the userid
    itself, plain ol' SELECT DISTINCT makes more sense.
    "bregent" <[email protected]> wrote in
    message
    news:ejaad1$k2u$[email protected]..
    > >On the contrary, subqueries in the FROM clause are
    quite useful and can
    > >in
    > >the right situations perform much better than
    alternative queries.
    >
    > Ah, as usual you are correct. It looks like he forgot to
    add a DT alias
    > name
    > at the end of the statement which is causing the error.
    But in any case, a
    > simple select distinct would yield the same results and
    performance,
    > correct?
    >

  • Datatype : 25 not supported error while saving Logical Query in BIP Dataset

    Hi All,
    I have created a nested logical Query in OBIEE Publisher Datamodel using parameters.
    Here is the simple query :
    Select name, revenue, date from
    select "SubjectAreaName"."TableName"."Name" name,
    case when :Date > date '2012-01-01' then "SubjectAreaName"."TableName"."Revenue" else NULL end Revenue,
    date date
    from
    "SubjectAreaName"
    where
    date = :Date
    ) T1
    Note - :Date is the parameter. When I try saving this dataset as-is, it throws me Datatype : 25 not supported error. But, when i replace the parameter :Date with actual date, then the query works. Also, the inner query works with or without parameters. The issue arises when I use the outer query and the parameters.
    Please let me know if you have come across such a problem ?
    Any help on this regard would be highly appreciated.
    Thanks
    Swarna

    ya i can understand we wont do the sql logic at the data model part as some time performance issue may come when comparaed to sql run in package and sql running in data model . so i have mostly done using package and i will just do select * from table in the data set of data model so i didn't face any issue's like this .
    once check this tutorial may be you already
    i use to create parameters like this i didn't face any issue
    SELECT * from TEST where ID=:p_id
    http://st-curriculum.oracle.com/obe/fmw/bi/bip/bip11g/gettingstarted/gettingstarted.htm

  • Simple Query working on 10G and not working on 11gR2 after upgrade

    Hi Folks,
    This is the first time i am posting the query in this Blog.
    I have a small issue which preventing the UAT Sigoff.
    Simple query working fine on 10.2.0.1 and after upgrade to 11.2.0.1 its error out
    10.2.0.4:
    =====
    SQL> SELECT COUNT(*) FROM APPS.HZ_PARTIES HP WHERE ATTRIBUTE_CATEGORY= 'PROPERTY' AND ATTRIBUTE1=1;
    COUNT(*)
    1
    SQL> SELECT COUNT(*) FROM APPS.HZ_PARTIES HP WHERE ATTRIBUTE_CATEGORY= 'PROPERTY' AND ATTRIBUTE1=00001;
    COUNT(*)
    1
    SQL> select ATTRIBUTE1 FROM APPS.HZ_PARTIES HP WHERE ATTRIBUTE_CATEGORY= 'PROPERTY' AND ATTRIBUTE1=1;
    ATTRIBUTE1
    00001
    11.2.0.1:
    =====
    SQL> SELECT COUNT(*) FROM APPS.HZ_PARTIES HP WHERE ATTRIBUTE_CATEGORY= 'PROPERTY' AND ATTRIBUTE1=1
    ERROR at line 1:
    ORA-01722: invalid number
    SQL> SELECT COUNT(*) FROM APPS.HZ_PARTIES HP WHERE ATTRIBUTE_CATEGORY= 'PROPERTY' AND ATTRIBUTE1=00001
    ERROR at line 1:
    ORA-01722: invalid number
    SQL> select ATTRIBUTE1 FROM APPS.HZ_PARTIES HP WHERE ATTRIBUTE_CATEGORY= 'PROPERTY' AND ATTRIBUTE1='1';
    no rows selected
    SQL> SELECT COUNT(*) FROM APPS.HZ_PARTIES HP WHERE ATTRIBUTE_CATEGORY= 'PROPERTY' AND ATTRIBUTE1='00001';
    COUNT(*)
    1
    SQL> select ATTRIBUTE1 FROM APPS.HZ_PARTIES HP WHERE ATTRIBUTE_CATEGORY= 'PROPERTY' AND ATTRIBUTE1='00001';
    ATTRIBUTE1
    00001
    ++++++++++++++++++++++++++++++++++++++++++++++
    SQL > desc APPS.HZ_PARTIES
    Name Type
    ======== ======
    ATTRIBUTE1 VARCHAR2(150)
    ++++++++++++++++++++++++++++++++++++++++++++++
    Changes:
    Recently i upgraded the DB from 10.2.0.4 to 11.2.0.1
    Query:
    1.If the type of that row is VARCHAR,why it is working in 10.2.0.4 and why not working in 11.2.0.1
    2.after upgrade i analyzed the table with "analyze table " query for all AP,AR,GL,HR,BEN,APPS Schemas--Is it got impact if we run analyze table.
    Please provide me the answer for above two questions or refer the document is also well enough to understand.Based on the Answer client will sigoff to-day.
    Thanks,
    P Kumar

    WhiteHat wrote:
    the issue has already been identified: in oracle versions prior to 11, there was an implicit conversion of numbers to characters. your database has a character field which you are attempting to compare to a number.
    i.e. the string '000001' is not in any way equivalent to the number 1. but Oracle 10 converts '000001' to a number because you are asking it to compare to the number you have provided.
    version 11 doesn't do this anymore (and rightly so).
    the issue is with the bad code design. you can either: use characters in the predicate (where field = 'parameter') or you can do a conversion of the field prior to comparing (where to_num(field) = parameter).
    I would suggest that you should fix your code and don't assume that '000001' = 1I don't think that the above is completely correct, and a simple demonstration will show why. First, a simple table on Oracle Database 10.2.0.4:
    CREATE TABLE T1(C1 VARCHAR2(20));
    INSERT INTO T1 VALUES ('1');
    INSERT INTO T1 VALUES ('0001');
    COMMIT;A select from the above table, relying on implicit data type conversion:
    SELECT
    FROM
      T1
    WHERE
      C1=1;
    C1
    1
    0001Technically, the second row should not have been returned as an exact match. Why was it returned, let's take a look at the actual execution plan:
    SELECT
    FROM
      TABLE(DBMS_XPLAN.DISPLAY_CURSOR(NULL,NULL,NULL));
    SQL_ID  g6gvbpsgj1dvf, child number 0
    SELECT   * FROM   T1 WHERE   C1=1
    Plan hash value: 3617692013
    | Id  | Operation         | Name | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT  |      |       |       |     2 (100)|          |
    |*  1 |  TABLE ACCESS FULL| T1   |     2 |    24 |     2   (0)| 00:00:01 |
    Predicate Information (identified by operation id):
       1 - filter(TO_NUMBER("C1")=1)
    Note
       - dynamic sampling used for this statementNotice that the VARCHAR2 column was converted to a NUMBER, so if there was any data in that column that could not be converted to a number (or NULL), we should receive an error (unless the bad rows are already removed due to another predicate in the WHERE clause). For example:
    INSERT INTO T1 VALUES ('.0001.');
    SELECT
    FROM
      T1
    WHERE
      C1=1;
    SQL> SELECT
      2    *
      3  FROM
      4    T1
      5  WHERE
      6    C1=1;
    ERROR:
    ORA-01722: invalid numberNow the same test on Oracle Database 11.1.0.7:
    CREATE TABLE T1(C1 VARCHAR2(20));
    INSERT INTO T1 VALUES ('1');
    INSERT INTO T1 VALUES ('0001');
    COMMIT;
    SELECT
    FROM
      T1
    WHERE
      C1=1;
    C1
    1
    0001
    SELECT
    FROM
      TABLE(DBMS_XPLAN.DISPLAY_CURSOR(NULL,NULL,NULL));
    SQL_ID  g6gvbpsgj1dvf, child number 0
    SELECT   * FROM   T1 WHERE   C1=1
    Plan hash value: 3617692013
    | Id  | Operation         | Name | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT  |      |       |       |     2 (100)|          |
    |*  1 |  TABLE ACCESS FULL| T1   |     2 |    24 |     2   (0)| 00:00:01 |
    Predicate Information (identified by operation id):
       1 - filter(TO_NUMBER("C1")=1)
    Note
       - dynamic sampling used for this statement
    INSERT INTO T1 VALUES ('.0001.');
    SELECT
    FROM
      T1
    WHERE
      C1=1;
    SQL> SELECT
      2    *
      3  FROM
      4    T1
      5  WHERE
      6    C1=1;
    ERROR:
    ORA-01722: invalid numberAs you can see, exactly the same actual execution plan, and the same end result.
    The OP needs to determine if non-numeric data now exists in the column. Was the database characterset possibly changed during/after the upgrade?
    Charles Hooper
    Co-author of "Expert Oracle Practices: Oracle Database Administration from the Oak Table"
    http://hoopercharles.wordpress.com/
    IT Manager/Oracle DBA
    K&M Machine-Fabricating, Inc.

  • 11.2.2.4.0 - Problem with temporary space in simple query

    ttVersion
    TimesTen Release 11.2.2.4.0 (64 bit Linux/x86_64) (timesten:53396) 2012-09-24T08:28:05Z
    Instance admin: root
    Instance home directory: /opt/TimesTen/timesten
    World accessible
    Daemon home directory: /var/TimesTen/timesten
    I get "TT0802: Database temporary space exhausted" error in simple query with small data amount; Timesten try to allocate *40000312* bytes
    describe adm.peer
    Table ADM.PEER:
    Name Null Type
    PEER_ID NOT NULL TT_SMALLINT
    CLUSTER_ID NOT NULL TT_TINYINT
    DIALECT NOT NULL TT_INTEGER
    HOST NOT NULL TT_VARCHAR(256 BYTE)
    REALM NOT NULL TT_VARCHAR(256 BYTE)
    ADDRESS TT_VARCHAR(256 BYTE)
    PORT NOT NULL TT_INTEGER
    PROTOCOL NOT NULL TT_INTEGER
    AUTO_CONNECT NOT NULL TT_TINYINT
    ENABLED NOT NULL TT_TINYINT
    PRIORITY NOT NULL TT_TINYINT
    MANDATORY NOT NULL TT_TINYINT
    TSTAMP BINARY(8)
    1 rows selected
    describe adm.session
    Table ADM.SESSION:
    Name Null Type
    SESSION_ID NOT NULL TT_VARCHAR(64 BYTE) inline
    OBJ_ID NOT NULL TT_BIGINT
    PR_OBJ_ID NOT NULL TT_BIGINT
    SUBSCRIBER_ID NOT NULL TT_VARCHAR(32 BYTE) inline
    IP NOT NULL TT_VARCHAR(15 BYTE) inline
    IPV6_PREFIX TT_VARCHAR(39 BYTE) inline
    IPV6_PREFIX_LEN NOT NULL TT_TINYINT
    CREATE_TIME NOT NULL TT_TIMESTAMP
    UPDATE_TIME NOT NULL TT_TIMESTAMP
    RULES_SET_ID NOT NULL TT_BIGINT
    PEER_ID NOT NULL TT_SMALLINT
    MY_PEER_ID NOT NULL TT_SMALLINT
    PROFILE_HASHC NOT NULL TT_BIGINT
    FLAGS NOT NULL TT_INTEGER
    QOS_POLICY_NAME NOT NULL TT_VARCHAR(32 BYTE) inline
    BSID NOT NULL TT_BIGINT
    CONGESTION_FLAG NOT NULL TT_TINYINT
    SERVICE_CATEGORY_ID TT_VARCHAR(32 BYTE) inline
    EVENT_CAUSE NOT NULL TT_TINYINT
    EVENT_TIME TT_TIMESTAMP
    TSTAMP BINARY(8)
    1 rows selected
    select * from adm.peer;
    PEER_ID CLUSTER_ID DIALECT HOST REALM ADDRESS PORT PROTOCOL AUTO_CONNECT ENABLED PRIORITY MANDATORY TSTAMP
    21 2 0 ddf1.server.com diameter.realm ddf1.server.com 3868 6 1 1 0 1 (null)
    22 2 0 ddf2.server.com diameter.realm ddf2.server.com 3868 6 1 1 1 1 (null)
    101 233 0 peer_101 testik.com peer_101.testik.com 3886 0 0 1 101 0 (null)
    102 233 0 peer_102 testik.com peer_102.testik.com 3886 0 0 1 102 0 (null)
    1 1 0 vr-t500.testik.com diameter.realm vr-t500.testik.com 3868 6 1 1 0 1 (null)
    5 rows selected
    select * from adm.session;
    SESSION_ID OBJ_ID PR_OBJ_ID SUBSCRIBER_ID IP IPV6_PREFIX IPV6_PREFIX_LEN CREATE_TIME UPDATE_TIME RULES_SET_ID PEER_ID MY_PEER_ID PROFILE_HASHC FLAGS QOS_POLICY_NAME BSID CONGESTION_FLAG SERVICE_CATEGORY_ID EVENT_CAUSE EVENT_TIME TSTAMP
    TEST_SESSION 13300000000020027 0 TEST_SUBSCRIBER 94.25.209.27 0 2012-10-18 12:56:07.155381000 2012-10-18 12:56:07.155381000 1 101 1 0 0 0 0 DEFAULT 0 (null) (null)
    TEST_SESSION2 13300000000020028 13300000000020027 TEST_SUBSCRIBER 94.25.209.27 0 2012-10-18 12:56:07.155687000 2012-10-18 12:56:07.155687000 1 102 1 0 4 0 0 DEFAULT 0 (null) (null)
    2 rows selected
    SELECT p.address, count(*) as session_count from session s, peer p where p.peer_id = s.peer_id group by p.address failed,
    TT0802: Database temporary space exhausted
    dssize
    PERM_ALLOCATED_SIZE:     307200.0
    PERM_IN_USE_SIZE:     61763.0
    PERM_IN_USE_HIGH_WATER:     69393.0
    TEMP_ALLOCATED_SIZE:     37888.0
    TEMP_IN_USE_SIZE:     13494.0
    TEMP_IN_USE_HIGH_WATER:     21307.0
    This is additional error info when this code exuted inside C code:
    [TimesTen][TimesTen 11.2.2.4.0 ODBC Driver][TimesTen]TT0802: Database temporary space exhausted -- file "blk.c", lineno 3477, procedure "sbBlkAlloc"
    ODBC Error/Warning = S1000, Additional Error/Warning = 802
    [TimesTen][TimesTen 11.2.2.4.0 ODBC Driver][TimesTen]TT6221: Temporary data partition free space insufficient to allocate *40000312* bytes of memory -- file "blk.c", lineno 3477, procedure "sbBlkAlloc"
    ODBC Error/Warning = S1000, Additional Error/Warning = 6221
    Edited by: Vladimir Romanov on 18.10.2012 13:13
    Edited by: Vladimir Romanov on 18.10.2012 13:51

    This may well be
    Bug 14634954 - SELECT WITH GROUP BY REQUESTS LARGE TEMP MEMORY GETS TT0802 / TT6221
    The bug is fixed in 11.2.2.4.1 which is hopefully due before the end of October. Can you run your test on 11.2.1 as well? The problem should not reproduce there as it is specific to 11.2.2

  • Sort Error - failed to parse query

    I'm using APEX 2.2.1 .
    I have a very detailed report, I wanted to implement a sorting feature into it, where you can click on the title and it'll sort asc or desc. Well Through reading my trusty Oracle manual I decided that a sort option would be the way to go.
    The detailed report had all the columns I wanted to be sortable enabled, and I ran it and I get :
    failed to parse SQL query:
    ORA-00911: invalid character
    I have gone down to only having one column checked with sort, and the Sort Sequence is set. No matter how I set this up I get the error. I then decided I'd put in a simple query into a report, to see if it worked at all:
    select * from super_user; - this return 2 columns and 2 rows.
    I get the same error when I try and enable sorting on this... What am I doing wrong?

    Literally 2 seconds after posting this I re-read it and saw that I have a semicolon after my query. I thought to myself "Self - how could it amend any sorting info if you're doing this?"
    I removed the semicolon and it worked.

  • "ORA-12801: error signalled in parallel query server"

    A client of ours is using our reporting tool, Impromptu 6, to report from an Oracle 8.1.6 database connecting with Net8. He has built a simple report which displays a single item from a single table but it fails with:-
    Query Server Error
    "ORA-12801: error signalled in parallel query server"
    Error number -9:
    DMS-E-GENERAL, A general exception has occurred during operation 'asynchronous open'.
    According to Oracle documentation, there should be an accompanying error message with the ORA-12801 which gives more information.
    The last few lines of the DMAUDFIL show:-
    OCI OEXEC LINE 5219:orsgbl.C
    OCI OEXEC LINE 5219:orsgbl.C
    CHECK_CODE2 -12801 LINE 5249:orsgbl.C
    OCI OERHMS -12801,ORA-12801: error signaled in parallel query server
    LINE 858:orsmisc.C
    The DMAPIFIL shows no error.
    The query being sent to the database is:-
    select T1."PRD_LVL_PARENT" "c1"
    from "JDAOPRD"."PRDMSTEE" T1
    where PRD_LVL_PARENT is defined as NUMBER(12)
    If they paste the above into SQL*Plus, it works fine.
    Reporting any other items from the database do not give this error.
    If they use the Oracle ODBC driver, they don't get the problem but it runs a lot slower.

    As your ORA-12801 is followed by a ORA-0600 this should be a database bug. First of all I'd bring the database on the last patchlevel (10.2.0.5), and if the error persists you can use the ORA-600/ORA-7445 Troubleshooter (Metalink Note 153788.1). If this doesn't help either you should log a SR with oracle support (you need a support contract to do all those steps).
    Also I don't think forms 5 is certified against a 10gR2 database, so this might cause your trouble. For 6i you should use the latest patchset.
    If you don't have a valid support contract you might have a chance in putting your query in a database procedure.
    cheers

  • Simple query with like return wrong result

    Hi,
    I run simple query with like.
    If I use parameter I get wrong results.
    If I use query without parameter results are ok.
    My script:
    ALTER SESSION SET NLS_SORT=BINARY_CI;
    ALTER SESSION SET NLS_COMP=LINGUISTIC;
    -- drop table abcd;
    create table abcd (col1 varchar2(10));
    INSERT INTO ABCD VALUES ('122222');
    insert into abcd values ('111222');
    SELECT * FROM ABCD WHERE COL1 LIKE :1; -- wrong result with value 12%
    COL1
    122222
    *111222*
    select * from abcd where col1 like '12%'; -- result ok
    COL1
    122222
    I use Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    and query run in Oracle SQL Developer 3.1.07.

    Hi,
    welcome to the forum.
    When you put some code please enclose it between two lines starting with {noformat}{noformat}
    i.e.:
    {noformat}{noformat}
    SELECT ...
    {noformat}{noformat}
    You should specify exactly how you run your code.
    If I run this statement in SQL Plus:SQL> ALTER SESSION SET NLS_SORT=BINARY_CI;
    Session altered.
    SQL> ALTER SESSION SET NLS_COMP=LINGUISTIC;
    Session altered.
    SQL>
    SQL> -- drop table abcd;
    SQL> create table abcd (col1 varchar2(10));
    Table created.
    SQL>
    SQL> INSERT INTO ABCD VALUES ('122222');
    1 row created.
    SQL> insert into abcd values ('111222');
    1 row created.
    SQL>
    SQL> SELECT * FROM ABCD WHERE COL1 LIKE :1;
    SP2-0552: Bind variable "1" not declared.
    SQL>
    I got this error. So I wonder how you set value 12%
    Please specify exactly how you run your test as we cannot reproduce your problem.
    Regards.
    Al                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Query Report Error ( Call function inside Query report )

    Hello every body,
    I'v database Oracle 11g R2 and i have Apex 4.1 , when i run my report with a simple query :
    select gydb_wf_id,
    gydb_workflow_name,
    gydb_work_flow_owner,
    FUNC_GET_NBR_LAST_STEPS ( gydb_workflow_id) NBR
    from gybd_workflow ;
    I got the following message error :
    Query cannot be parsed within the Builder. If you believe your query is syntactically correct,
    check the ''generic columns'' checkbox below the region source to proceed without parsing.
    ORA-00904: "FUNC_GET_NBR_LAST_STEPS": invalid identifie
    Note that i have all privilages on my function (FUNC_GET_NBR_LAST_STEPS) ,
    Any issues
    Tnahkyou

    Hi Yosof      ,
    concatenate schema name with your function
    for example
    select gydb_wf_id,
    gydb_workflow_name,
    gydb_work_flow_owner,
    ABC.FUNC_GET_NBR_LAST_STEPS ( gydb_workflow_id) NBR  // here i have written ABC as schema name
    from gybd_workflow ;try and see it is working or not.
    hope it works,
    Thanks,
    Jitendra

  • Error while trying to query mbean

    I am getting an error while trying to query MBeans:
    <Mar 27, 2007 4:27:32 AM MDT> <Warning> <JNDI> <BEA-050001> <WLContext.close() was called in a different thread than the one in which it was created.>
    ERROR: Tue Mar 27 04:27:32 MDT 2007MBeanHome being refreshed weblogic.management.NoAccessRuntimeException: User guest does not have access permission on weblogic.admin.mbean.MBeanHome
    Bea doc says that the cause of this error is that the context is closed in a different thread than the one that created it. I have multiple thread that query the mbeans. The code that does the above is in a synchronized block. The code runs fine on some environments. On wls 8.1 it is giving the above error.
    Anyone faced this issue? Any ideas, suggestions?
    thanks a lot
    Jain

    Hi Daniel
    Thanks for your help. Here is some more info.
    I have another application that goes out and tries to get the MBeanHome. Here is the code:
    Environment env = new Environment();
    env.setProviderUrl(t3URL);
    env.setSecurityPrincipal(t3UserName);
    env.setSecurityCredentials(t3Password);
    ctx = env.getInitialContext();
    mBeanHome = (MBeanHome) ctx.lookup MBeanHome.ADMIN_JNDI_NAME);
    This code runs fine in the app. where it is not threaded. But the same code when run in a separate thread is throwing the error. It is happening only in wbl 8.1. In wls 6.1 it runs fine. It is strange. Any clues will be appreciated.

  • How to write a simple query.

    I have a table where I have data shown below. Now, I want to write a simple query which lists me the project and the count of the distinct effective dates for which data is existant there.
    Sample data:
    Project Task Effective Date (xx_proj_task_data)
    101 T1 01-Jan-2008
    101 T1 01-Feb-2008
    101 T1 01-Mar-2008
    101 T2 01-Jan-2008
    101 T2 01-Apr-2008
    101 T3 01-Apr-2008
    102 T1 01-Jan-2008
    102 T1 01-Feb-2008
    102 T2 01-Apr-2008
    103 T1 01-Jan-2008
    103 T1 01-Feb-2008
    103 T1 01-Mar-2008
    103 T1 01-Apr-2008
    103 T2 01-May-2008
    103 T3 01-Jun-2008
    103 T1 01-Jan-2008
    103 T1 01-Aug-2008
    103 T2 01-Apr-2008
    Output Reqd:
    Project Count(Distinct Effective Dates)
    101 4
    102 3
    103 7
    I can write a query that says:
    select project_id, count(1)
    from (select distinct project_id, effective_date
    from xx_proj_task_data) x
    group by project_id;
    But, is there a way I can achieve the same by avoiding the inner Query (x) and just by a simple query ?
    Thanks!

    Try below query:
    select project_id
    , count(distinct effective_date)
    from xx_proj_task_data
    group by project_id;
    --venkata                                                                                                                                                                                                                                                                                       

  • Error message "Error when scheduling the query(JOB_CLOSE)".

    Hi all,
    While using query extractor (rscrm_bapi) I am getting error message "Error when scheduling the query(JOB_CLOSE)".
    Could you please find what this error is?
    Thanks,
    Uday.

    Hi Uday,
    This problem can occur if you changed the query definition.
    In this case the query definition would be inconsistent with the existing extract structure.
    Certain Meta information is maintained with each extract defined using the RSCRM_BAPI. If the definition of the query is changed and you need to use the same extract table then you need to delete the extract using the report RSCRMBW_DEL_ALL_EXTRACTS selecting the extract you want
    to delete.
    After this you could use the same table name for any further extract that you need to create.
    One caution is that the extract table should not be deleted through any other transaction before you run the report.
    Rgds,
    Colum

  • Error in invoking task query service-after customising Worklist application

    hi' I am getting error after trying to customize the Worklist application.
    IWorkflowServiceClient wfSvcClient =WorkflowServiceClientFactory.getWorkflowServiceClient(WorkflowServiceClientFactory.SOAP_CLIENT);
    IWorkflowContext wfCtx = wfSvcClient.getTaskQueryService().authenticate(userid, password, realm_name, null);
    In the above code 2nd line gives error:
    log4j:WARN No appenders could be found for logger (collaxa.cube.services).
    log4j:WARN Please initialize the log4j system properly.
    <2009-11-16 11:36:55,598> <ERROR> <oracle.bpel.services.workflow> <::>
    java.lang.NullPointerException
         at oracle.bpel.services.common.util.AbstractJaxbUtil.getAbsoluteSchemaLocation(AbstractJaxbUtil.java:320)
         at oracle.bpel.services.common.util.AbstractJaxbUtil.createUnmarshaller(AbstractJaxbUtil.java:295)
         at oracle.bpel.services.common.util.AbstractJaxbUtil.unmarshal(AbstractJaxbUtil.java:145)
         at oracle.bpel.services.common.util.AbstractJaxbUtil.unmarshal(AbstractJaxbUtil.java:127)
         at oracle.bpel.services.config.ConfigurationManager.init(ConfigurationManager.java:60)
         at oracle.bpel.services.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:101)
         at oracle.bpel.services.config.ConfigurationManager.getProperty(ConfigurationManager.java:119)
         at oracle.bpel.services.config.ConfigurationManager.getBooleanProperty(ConfigurationManager.java:170)
         at oracle.bpel.services.common.exception.ServicesException.<clinit>(ServicesException.java:61)
         at oracle.bpel.services.config.ConfigurationManager.init(ConfigurationManager.java:79)
         at oracle.bpel.services.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:101)
         at oracle.bpel.services.workflow.verification.impl.VerificationService.<clinit>(VerificationService.java:151)
         at oracle.bpel.services.workflow.query.client.AbstractDOMTaskQueryServiceClient.<clinit>(AbstractDOMTaskQueryServiceClient.java:73)
         at oracle.bpel.services.workflow.client.SOAPWorkflowServiceClient.getTaskQueryService(SOAPWorkflowServiceClient.java:73)
         at test.GetWorkList.getWorklist(GetWorkList.java:39)
         at test.GetWorkList.main(GetWorkList.java:111)
    <::> ORABPEL-30028
    <::>
    <::> Invalid configuration file wf_config.xml
    <::> The configuration file wf_config.xml not be read.
    <::> Make sure that the configuration file wf_config.xml is available and is a valid XML document. Contact oracle support if error is not fixable.
    <::>
    <::>      at oracle.bpel.services.config.ConfigurationManager.init(ConfigurationManager.java:79)
    <::>      at oracle.bpel.services.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:101)
    <::>      at oracle.bpel.services.config.ConfigurationManager.getProperty(ConfigurationManager.java:119)
    <::>      at oracle.bpel.services.config.ConfigurationManager.getBooleanProperty(ConfigurationManager.java:170)
    <::>      at oracle.bpel.services.common.exception.ServicesException.<clinit>(ServicesException.java:61)
    <::>      at oracle.bpel.services.config.ConfigurationManager.init(ConfigurationManager.java:79)
    <::>      at oracle.bpel.services.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:101)
    <::>      at oracle.bpel.services.workflow.verification.impl.VerificationService.<clinit>(VerificationService.java:151)
    <::>      at oracle.bpel.services.workflow.query.client.AbstractDOMTaskQueryServiceClient.<clinit>(AbstractDOMTaskQueryServiceClient.java:73)
    <::>      at oracle.bpel.services.workflow.client.SOAPWorkflowServiceClient.getTaskQueryService(SOAPWorkflowServiceClient.java:73)
    <::>      at test.GetWorkList.getWorklist(GetWorkList.java:39)
    <::>      at test.GetWorkList.main(GetWorkList.java:111)
    <::> Caused by: java.lang.NullPointerException
    <::>      at oracle.bpel.services.common.util.AbstractJaxbUtil.getAbsoluteSchemaLocation(AbstractJaxbUtil.java:320)
    <::>      at oracle.bpel.services.common.util.AbstractJaxbUtil.createUnmarshaller(AbstractJaxbUtil.java:295)
    <::>      at oracle.bpel.services.common.util.AbstractJaxbUtil.unmarshal(AbstractJaxbUtil.java:145)
    <::>      at oracle.bpel.services.common.util.AbstractJaxbUtil.unmarshal(AbstractJaxbUtil.java:127)
    <::>      at oracle.bpel.services.config.ConfigurationManager.init(ConfigurationManager.java:60)
    <::>      ... 11 more
    <2009-11-16 11:36:55,598> <ERROR> <oracle.bpel.services.workflow> <::>
    java.lang.NullPointerException
         at oracle.bpel.services.common.util.AbstractJaxbUtil.getAbsoluteSchemaLocation(AbstractJaxbUtil.java:320)
         at oracle.bpel.services.common.util.AbstractJaxbUtil.createUnmarshaller(AbstractJaxbUtil.java:295)
         at oracle.bpel.services.common.util.AbstractJaxbUtil.unmarshal(AbstractJaxbUtil.java:145)
         at oracle.bpel.services.common.util.AbstractJaxbUtil.unmarshal(AbstractJaxbUtil.java:127)
         at oracle.bpel.services.config.ConfigurationManager.init(ConfigurationManager.java:60)
         at oracle.bpel.services.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:101)
         at oracle.bpel.services.config.ConfigurationManager.getProperty(ConfigurationManager.java:119)
         at oracle.bpel.services.config.ConfigurationManager.getBooleanProperty(ConfigurationManager.java:170)
         at oracle.bpel.services.common.exception.ServicesException.<clinit>(ServicesException.java:61)
         at oracle.bpel.services.config.ConfigurationManager.init(ConfigurationManager.java:79)
         at oracle.bpel.services.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:101)
         at oracle.bpel.services.workflow.verification.impl.VerificationService.<clinit>(VerificationService.java:151)
         at oracle.bpel.services.workflow.query.client.AbstractDOMTaskQueryServiceClient.<clinit>(AbstractDOMTaskQueryServiceClient.java:73)
         at oracle.bpel.services.workflow.client.SOAPWorkflowServiceClient.getTaskQueryService(SOAPWorkflowServiceClient.java:73)
         at test.GetWorkList.getWorklist(GetWorkList.java:39)
         at test.GetWorkList.main(GetWorkList.java:111)
    <::> ORABPEL-30028
    <::>
    <::> Invalid configuration file wf_config.xml
    <::> The configuration file wf_config.xml not be read.
    <::> Make sure that the configuration file wf_config.xml is available and is a valid XML document. Contact oracle support if error is not fixable.
    <::>
    <::>      at oracle.bpel.services.config.ConfigurationManager.init(ConfigurationManager.java:79)
    <::>      at oracle.bpel.services.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:101)
    <::>      at oracle.bpel.services.workflow.verification.impl.VerificationService.<clinit>(VerificationService.java:151)
    <::>      at oracle.bpel.services.workflow.query.client.AbstractDOMTaskQueryServiceClient.<clinit>(AbstractDOMTaskQueryServiceClient.java:73)
    <::>      at oracle.bpel.services.workflow.client.SOAPWorkflowServiceClient.getTaskQueryService(SOAPWorkflowServiceClient.java:73)
    <::>      at test.GetWorkList.getWorklist(GetWorkList.java:39)
    <::>      at test.GetWorkList.main(GetWorkList.java:111)
    <::> Caused by: java.lang.NullPointerException
    <::>      at oracle.bpel.services.common.util.AbstractJaxbUtil.getAbsoluteSchemaLocation(AbstractJaxbUtil.java:320)
    <::>      at oracle.bpel.services.common.util.AbstractJaxbUtil.createUnmarshaller(AbstractJaxbUtil.java:295)
    <::>      at oracle.bpel.services.common.util.AbstractJaxbUtil.unmarshal(AbstractJaxbUtil.java:145)
    <::>      at oracle.bpel.services.common.util.AbstractJaxbUtil.unmarshal(AbstractJaxbUtil.java:127)
    <::>      at oracle.bpel.services.config.ConfigurationManager.init(ConfigurationManager.java:60)
    <::>      ... 6 more
    <2009-11-16 11:36:55,598> <ERROR> <oracle.bpel.services.workflow> <::>
    java.lang.NullPointerException
         at oracle.bpel.services.common.util.AbstractJaxbUtil.getAbsoluteSchemaLocation(AbstractJaxbUtil.java:320)
         at oracle.bpel.services.common.util.AbstractJaxbUtil.createUnmarshaller(AbstractJaxbUtil.java:295)
         at oracle.bpel.services.common.util.AbstractJaxbUtil.unmarshal(AbstractJaxbUtil.java:145)
         at oracle.bpel.services.common.util.AbstractJaxbUtil.unmarshal(AbstractJaxbUtil.java:127)
         at oracle.bpel.services.config.ConfigurationManager.init(ConfigurationManager.java:60)
         at oracle.bpel.services.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:101)
         at oracle.bpel.services.workflow.verification.impl.VerificationService.<clinit>(VerificationService.java:151)
         at oracle.bpel.services.workflow.query.client.AbstractDOMTaskQueryServiceClient.<clinit>(AbstractDOMTaskQueryServiceClient.java:73)
         at oracle.bpel.services.workflow.client.SOAPWorkflowServiceClient.getTaskQueryService(SOAPWorkflowServiceClient.java:73)
         at test.GetWorkList.getWorklist(GetWorkList.java:39)
         at test.GetWorkList.main(GetWorkList.java:111)
    <::> ORABPEL-30028
    <::>
    <::> Invalid configuration file wf_config.xml
    <::> The configuration file wf_config.xml not be read.
    <::> Make sure that the configuration file wf_config.xml is available and is a valid XML document. Contact oracle support if error is not fixable.
    <::>
    <::>      at oracle.bpel.services.config.ConfigurationManager.init(ConfigurationManager.java:79)
    <::>      at oracle.bpel.services.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:101)
    <::>      at oracle.bpel.services.workflow.verification.impl.VerificationService.<clinit>(VerificationService.java:151)
    <::>      at oracle.bpel.services.workflow.query.client.AbstractDOMTaskQueryServiceClient.<clinit>(AbstractDOMTaskQueryServiceClient.java:73)
    <::>      at oracle.bpel.services.workflow.client.SOAPWorkflowServiceClient.getTaskQueryService(SOAPWorkflowServiceClient.java:73)
    <::>      at test.GetWorkList.getWorklist(GetWorkList.java:39)
    <::>      at test.GetWorkList.main(GetWorkList.java:111)
    <::> Caused by: java.lang.NullPointerException
    <::>      at oracle.bpel.services.common.util.AbstractJaxbUtil.getAbsoluteSchemaLocation(AbstractJaxbUtil.java:320)
    <::>      at oracle.bpel.services.common.util.AbstractJaxbUtil.createUnmarshaller(AbstractJaxbUtil.java:295)
    <::>      at oracle.bpel.services.common.util.AbstractJaxbUtil.unmarshal(AbstractJaxbUtil.java:145)
    <::>      at oracle.bpel.services.common.util.AbstractJaxbUtil.unmarshal(AbstractJaxbUtil.java:127)
    <::>      at oracle.bpel.services.config.ConfigurationManager.init(ConfigurationManager.java:60)
    <::>      ... 6 more
    <2009-11-16 11:36:55,598> <ERROR> <oracle.bpel.services.workflow> <::>
    java.lang.NullPointerException
         at oracle.bpel.services.common.util.AbstractJaxbUtil.getAbsoluteSchemaLocation(AbstractJaxbUtil.java:320)
         at oracle.bpel.services.common.util.AbstractJaxbUtil.createUnmarshaller(AbstractJaxbUtil.java:295)
         at oracle.bpel.services.common.util.AbstractJaxbUtil.unmarshal(AbstractJaxbUtil.java:145)
         at oracle.bpel.services.common.util.AbstractJaxbUtil.unmarshal(AbstractJaxbUtil.java:127)
         at oracle.bpel.services.config.ConfigurationManager.init(ConfigurationManager.java:60)
         at oracle.bpel.services.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:101)
         at oracle.bpel.services.workflow.verification.impl.VerificationService.<clinit>(VerificationService.java:151)
         at oracle.bpel.services.workflow.query.client.AbstractDOMTaskQueryServiceClient.<clinit>(AbstractDOMTaskQueryServiceClient.java:73)
         at oracle.bpel.services.workflow.client.SOAPWorkflowServiceClient.getTaskQueryService(SOAPWorkflowServiceClient.java:73)
         at test.GetWorkList.getWorklist(GetWorkList.java:39)
         at test.GetWorkList.main(GetWorkList.java:111)
    <::> WorkflowService:: VerificationService.VerificationService: Session Timeout set to default due to error: Invalid configuration file wf_config.xml
    <::> The configuration file wf_config.xml not be read.
    <::> Make sure that the configuration file wf_config.xml is available and is a valid XML document. Contact oracle support if error is not fixable.
    ITaskQueryService
    <::> ORABPEL-30509
    <::>
    <::> Error in invoking task query service.
    <::> A client side error occured in invoking the task query service.
    <::> Please check the exception error stack to identify the error. Contact oracle support if error is not fixable.
    <::>
    <::>      at oracle.bpel.services.workflow.query.client.TaskQueryServiceSOAPClient.invoke(TaskQueryServiceSOAPClient.java:176)
    <::>      at oracle.bpel.services.workflow.query.client.TaskQueryServiceSOAPClient.authenticate(TaskQueryServiceSOAPClient.java:193)
    <::>      at oracle.bpel.services.workflow.query.client.AbstractDOMTaskQueryServiceClient.authenticate(AbstractDOMTaskQueryServiceClient.java:90)
    <::>      at test.GetWorkList.getWorklist(GetWorkList.java:43)
    <::>      at test.GetWorkList.main(GetWorkList.java:111)
    <::> Caused by: javax.xml.soap.SOAPException: Unable to create message factory for SOAP: Provider org.apache.axis.soap.MessageFactoryImpl not found
    <::>      at javax.xml.soap.MessageFactory.newInstance(MessageFactory.java:119)
    <::>      at oracle.bpel.services.workflow.query.client.TaskQueryServiceSOAPClient.invoke(TaskQueryServiceSOAPClient.java:103)
    <::>      ... 4 more
    <2009-11-16 11:36:55,661> <ERROR> <oracle.bpel.services.workflow> <::> Unable to create message factory for SOAP: Provider org.apache.axis.soap.MessageFactoryImpl not found
    javax.xml.soap.SOAPException: Unable to create message factory for SOAP: Provider org.apache.axis.soap.MessageFactoryImpl not found
         at javax.xml.soap.MessageFactory.newInstance(MessageFactory.java:119)
         at oracle.bpel.services.workflow.query.client.TaskQueryServiceSOAPClient.invoke(TaskQueryServiceSOAPClient.java:103)
         at oracle.bpel.services.workflow.query.client.TaskQueryServiceSOAPClient.authenticate(TaskQueryServiceSOAPClient.java:193)
         at oracle.bpel.services.workflow.query.client.AbstractDOMTaskQueryServiceClient.authenticate(AbstractDOMTaskQueryServiceClient.java:90)
         at test.GetWorkList.getWorklist(GetWorkList.java:43)
         at test.GetWorkList.main(GetWorkList.java:111)
    <::> ORABPEL-30509
    <::>
    <::> Error in invoking task query service.
    <::> A client side error occured in invoking the task query service.
    <::> Please check the exception error stack to identify the error. Contact oracle support if error is not fixable.
    <::>
    <::>      at oracle.bpel.services.workflow.query.client.TaskQueryServiceSOAPClient.invoke(TaskQueryServiceSOAPClient.java:176)
    <::>      at oracle.bpel.services.workflow.query.client.TaskQueryServiceSOAPClient.authenticate(TaskQueryServiceSOAPClient.java:193)
    <::>      at oracle.bpel.services.workflow.query.client.AbstractDOMTaskQueryServiceClient.authenticate(AbstractDOMTaskQueryServiceClient.java:90)
    <::>      at test.GetWorkList.getWorklist(GetWorkList.java:43)
    <::>      at test.GetWorkList.main(GetWorkList.java:111)
    <::> Caused by: javax.xml.soap.SOAPException: Unable to create message factory for SOAP: Provider org.apache.axis.soap.MessageFactoryImpl not found
    <::>      at javax.xml.soap.MessageFactory.newInstance(MessageFactory.java:119)
    <::>      at oracle.bpel.services.workflow.query.client.TaskQueryServiceSOAPClient.invoke(TaskQueryServiceSOAPClient.java:103)
    <::>      ... 4 more
    <2009-11-16 11:36:55,661> <ERROR> <oracle.bpel.services.workflow> <::> Unable to create message factory for SOAP: Provider org.apache.axis.soap.MessageFactoryImpl not found
    javax.xml.soap.SOAPException: Unable to create message factory for SOAP: Provider org.apache.axis.soap.MessageFactoryImpl not found
         at javax.xml.soap.MessageFactory.newInstance(MessageFactory.java:119)
         at oracle.bpel.services.workflow.query.client.TaskQueryServiceSOAPClient.invoke(TaskQueryServiceSOAPClient.java:103)
         at oracle.bpel.services.workflow.query.client.TaskQueryServiceSOAPClient.authenticate(TaskQueryServiceSOAPClient.java:193)
         at oracle.bpel.services.workflow.query.client.AbstractDOMTaskQueryServiceClient.authenticate(AbstractDOMTaskQueryServiceClient.java:90)
         at test.GetWorkList.getWorklist(GetWorkList.java:43)
         at test.GetWorkList.main(GetWorkList.java:111)
    Error in invoking task query service.
    A client side error occured in invoking the task query service.
    Please check the exception error stack to identify the error. Contact oracle support if error is not fixable.
    javax.xml.soap.SOAPException: Unable to create message factory for SOAP: Provider org.apache.axis.soap.MessageFactoryImpl not found
         at javax.xml.soap.MessageFactory.newInstance(MessageFactory.java:119)
         at oracle.bpel.services.workflow.query.client.TaskQueryServiceSOAPClient.invoke(TaskQueryServiceSOAPClient.java:103)
         at oracle.bpel.services.workflow.query.client.TaskQueryServiceSOAPClient.authenticate(TaskQueryServiceSOAPClient.java:193)
         at oracle.bpel.services.workflow.query.client.AbstractDOMTaskQueryServiceClient.authenticate(AbstractDOMTaskQueryServiceClient.java:90)
         at test.GetWorkList.getWorklist(GetWorkList.java:43)
         at test.GetWorkList.main(GetWorkList.java:111)after taskquery
    Edited by: Yatan on Nov 16, 2009 12:22 PM

    I am not getting where to keep this .xml file so it is able to read this.
    please advice.
    thanks
    Yatan

  • Error while executing BEX query via FM

    Hi Friends,
    I am getting following error while executing a query via FM RRW3_GET_QUERY_VIEW_DATA.
    Please see the error screenshot as follows.
    the I_T_PARAMETERS entered are as follows.
    Please let me know what is missing.
    Thanks.
    Regards,
    Hrishikesh

    the key date variable 0DAT is normally filled by a SAP exit variable, but this may not be the case.  it could have been changed in the query designer,  check the query in query designer and see.
    Try passing 0DAT in the variable list with todays date

Maybe you are looking for