Database adapter returns result different to SQL

Hi,
I created Database adapter for master-detail select:
SELECT DISTINCT t1.INSTANCE_ID, t1.SERVICE_ID, t0.CONFIGURATION_KEY, t0.CONFIGURATION_VALUE, t0.INSTANCE_ID FROM SRVINSTANCECONF t0, SERVICE_INSTANCE t1
WHERE (((t0.CONFIGURATION_KEY = #key) AND (t1.SERVICE_ID = #serviceID)) AND (t0.INSTANCE_ID = t1.INSTANCE_ID))
This select in our database return 2 rows. This is what I want.
But when I call webservice with database adapter this returns 2 master tags but all detail tags. It looks like t0.CONFIGURATION_KEY = #key where condition is not taken into SQL statement.
Thanks

pk of detail is t0.CONFIGURATION_VALUE, t0.INSTANCE and row are not duplicated. Problem is that rows are not filtered.
There are all rows with SERVICE_ID = 2
INSTANCE_ID, SERVICE_ID, CONFIGURATION_KEY
3,2,"instanceType"
3,2,"keyName"
3,2,"device"
3,2,"tebs"
3,2,"size"
3,2,"imageId"
3,2,"securityGroups"
3,2,"dir"
2,2,"imageId"
Adapter returns for CONFIGURATION_KEY = "imageId" AND SERVICE_ID = 2 this XML
          <top:ServiceInstanceCollection xmlns:top="http://xmlns.oracle.com/pcbpel/adapter/db/top/InstancesConfigurationAdapter">
               <top:ServiceInstance>
                    <top:instanceId>2</top:instanceId>
                    <top:serviceId>2</top:serviceId>
                    <top:srvinstanceconfCollection>
                         <top:Srvinstanceconf>
                              <top:configurationKey>imageId</top:configurationKey>
                         </top:Srvinstanceconf>
                    </top:srvinstanceconfCollection>
               </top:ServiceInstance>
               <top:ServiceInstance>
                    <top:instanceId>3</top:instanceId>
                    <top:serviceId>2</top:serviceId>
                    <top:srvinstanceconfCollection>
                         <top:Srvinstanceconf>
                              <top:configurationKey>instanceType</top:configurationKey>
                         </top:Srvinstanceconf>
                         <top:Srvinstanceconf>
                              <top:configurationKey>securityGroups</top:configurationKey>
                         </top:Srvinstanceconf>
                         <top:Srvinstanceconf>
                              <top:configurationKey>size</top:configurationKey>
                         </top:Srvinstanceconf>
                         <top:Srvinstanceconf>
                              <top:configurationKey>dir</top:configurationKey>
                         </top:Srvinstanceconf>
                         <top:Srvinstanceconf>
                              <top:configurationKey>imageId</top:configurationKey>
                         </top:Srvinstanceconf>
                         <top:Srvinstanceconf>
                              <top:configurationKey>tebs</top:configurationKey>
                         </top:Srvinstanceconf>
                         <top:Srvinstanceconf>
                              <top:configurationKey>keyName</top:configurationKey>
                         </top:Srvinstanceconf>
                         <top:Srvinstanceconf>
                              <top:configurationKey>device</top:configurationKey>
                         </top:Srvinstanceconf>
                    </top:srvinstanceconfCollection>
               </top:ServiceInstance>
          </top:ServiceInstanceCollection>

Similar Messages

  • How to call a stored to search database then return results to jsp page

    Hi,
    Most of what i have said is in the title. Im trying to search a database using a stored procedure that will call the procedure using sql2000 then coming back with the results to the jsp page. all of this is done using JSP web pages. if JAVA example is availabel then let me know.
    I need some examples.. I cant seem to find any code that will help.
    Thanks

    Make use of Callablestatement. You can set parameters to it by registerOutParameters and setXXX methods. And use getXXX methods to get results of procedure.

  • Query database and return result set to cells.

    hello all i have vsto solution im building im trying to put together a generic query text box for my end user the only problem is that it appears to be that with oracle data access when you do a query you must pass all the values to a variable.
    Sub Orcl()
            Dim oradb As String = "Data Source=(DESCRIPTION=(ADDRESS_LIST=" _
                       + "(ADDRESS=(PROTOCOL=TCP)(HOST=xxx)(PORT=1521)))" _
                       + "(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=xxx)));" _
                       + "User Id=xx;Password=xx;"
             Dim conn As New Oracle.DataAccess.Client.OracleConnection(oradb) ' Visual Basic
            conn.Open()
            Query = select * from fabinvh
            Dim cmd As New Oracle.DataAccess.Client.OracleCommand
            cmd = conn.CreateCommand()
            cmd.Connection = conn
            cmd.CommandText = Query
            Dim dr As Oracle.DataAccess.Client.OracleDataReader = cmd.ExecuteReader()
            While dr.Read()
                Globals.ThisAddIn.Application.ActiveCell.Value = (dr.Item(1))''' HOW DO I CHANGE HERE TO JUST BRING IN ALL THE COLUMNS AND HEADERS?
                Globals.ThisAddIn.Application.ActiveCell.Offset(1, 0).Select()
            End While
            dr.Dispose()
            cmd.Dispose()
            conn.Dispose()
        End Subthanks in advance im able to do this with oo4o rather easily but I'm tryint go learn more of the odp.net oracle data access and learning is pretty slow right now.

    ok I think im getting closer to my answer i believe i need to use the
    GetValues. property. does anyone have an example on how to use this i keep getting errors when i try it.

  • 11g Database Adapter: How to make queries using LIKE with % (possible bug?)

    Hi there!
    Sorry if this has been answered before, but the forum search ignores '%' so I could not find anything relevant. I'm completely at a loss here guys so any help will be really appreciated.
    I've got a database adapter that executes a "pure SQL" query:
    select * from supplier t
    WHERE t.idsupplier = #idSupplierParam OR #idSupplierParam2 IS NULL
    AND t.name like '%' || #nameParam || '%' OR #nameParam2 IS NULL
    AND t.address like '%' || #addressParam || '%' OR #addressParam2 IS NULL
    AND t.description like '%' || #descParam || '%' OR #descParam2 IS NULL
    I've got a single record in my DB with name= 'supplier1'
    When I execute my bpel passing 'sup' as nameParam and nameParam2, everything is right and I get my supplier1 in the results.
    BUT if I pass 'asdfghj' as name, I still get my 'supplier1' in the results ¿¿¿???
    ¿Is this a bug? ¿Am I doing something wrong? Thanks in advance!!

    No, but thanks for trying. Iif you had read my post you'd had found that I wrote
    +When I execute my bpel passing 'sup' as nameParam and nameParam2+
    But I double checked against that just in case. I made a test query
    select * from supplier t WHERE t.name like '%' || #nameParam || '%'
    And no matter what I pass as nameParam, I always GET ALL THE RECORDS in my table. ¿Any idea what's going on? It's like param is being ignored and the query that is executed is select * from supplier t WHERE t.name like '%%' which would of course return everything in the DB. :(
    Help plz!!

  • Database Adapter and Paging

    Hi
    I would like to add paging (first row, number of rows) to the Database Adapter that are calling PL/SQL. I can't see any options for this. Is this is something that I have to do at the PL/SQL level to work with Database Adapter? How would I do this in PL/SQL?
    Regards

    Try something like this...
    SELECT * FROM
         SELECT a.*, rownum r__
         FROM
              SELECT * FROM ORDERS WHERE CustomerID LIKE 'A%'
              ORDER BY OrderDate DESC, ShippingDate DESC
         ) a
         WHERE rownum < ((pageNumber * pageSize) + 1 )
    WHERE r__ >= (((pageNumber-1) * pageSize) + 1)
    This was extracted from Frans Bouma's blog...
    http://weblogs.asp.net/fbouma/archive/2007/05/21/api-s-and-production-code-shouldn-t-be-designed-by-scientists.aspx
    Cheers,
    Vlad

  • Database adapter not returning all the records

    I've taken over a BPEL from a developer who left the organization and have been having an issue during our User Acceptance Testing. We are querying a table that will return the insurance enrollment information for employee's and their dependants. When an employee change plans, or adds people, the old plan is terminated and a new once is created. When this happens there will be two records on the database to show the old plan and the new plan.
    When we run the SQL thru JDEV or SQLDeveloper, the data comes out fine. When we run it through a BPEL Database Adapter we are only getting one of the rows returned.
    I have created a small tester BPEL that is easily modified and deployed to run the same query to try multiple configurations changes within the DBAdapter. What I have found is all the records are returned when the "Return single result set" box on the DBAdapter Wizard is unchecked. When it's checked then it only returns one record for the employees with an old and a new plan.
    Can someone explain what the "Return single result set" option does, and what the impact will be if it's unchecked?

    Hello,
    In same way i am using two parent-child(header-line) tables. they have one to many relationship.
    I want to generate XML which contains multiple line items under a child elements for header elements.
    I have tried it but i am getting only one line under that child item. i am using jdev10.0.3.3.0
    can u help me please.
    -regards
    satyendra

  • Same Query returning different result (Different execution plan)

    Hi all,
    To day i have discovered a strange thing: a query that return a different result when using a different execution plan.
    The query :
    SELECT  *
      FROM schema.table@database a
    WHERE     column1 IN ('3')
           AND column2 = '101'
           AND EXISTS
                  (SELECT null
                     FROM schema.table2 c
                    WHERE a.column3 = SUBSTR (c.column1, 2, 12));where schema.table@database is a remote table.
    when executed with the hint /*+ ordered use_nl(a c) */ these query return no result and its execution plan is :
    Rows     Row Source Operation
          0  NESTED LOOPS  (cr=31 r=0 w=0 time=4894659 us)
       4323   SORT UNIQUE (cr=31 r=0 w=0 time=50835 us)
       4336    TABLE ACCESS FULL TABLE2 (cr=31 r=0 w=0 time=7607 us)
          0   REMOTE  (cr=0 r=0 w=0 time=130536 us)When i changed the execution plan with the hint /*+ use_hash(c a) */
    Rows     Row Source Operation
       3702  HASH JOIN SEMI (cr=35 r=0 w=0 time=497839 us)
      22556   REMOTE  (cr=0 r=0 w=0 time=401176 us)
       4336   TABLE ACCESS FULL TABLE2 (cr=35 r=0 w=0 time=7709 us)It seem that when the execution plan have changed the remote query return no result.
    It'is a bug or i have missed somthing ?
    PS: The two table are no subject to insert or update statement.
    Oracle version : 9.2.0.2.0
    System version : HP-UX v1
    Thanks.

    H.Mahmoud wrote:
    Oracle version : 9.2.0.2.0
    System version : HP-UX v1Hard to say. You're using a very old and deprecated version of the database, and one that was known to contain bugs.
    9.2.0.7 was really the lowest version of 9i that was considered to be 'stable', but even so, it's old and lacking in many ways.
    Consider upgrading to the latest database version at your earliest opportunity. (or at least apply patches up to the latest 9i version before querying if there is bugs in your really low buggy version)

  • Database Adapter and SQL Server procedure issue

    Hello,
    I am using Jdev 11.1.1.7.0 and SQL Server 2005.
    In the Database Adapter configuration wizard, Specify Stored Procedure step, I choose the “GEACupax” schema and got the following error after a click on “Procedure Browse” button:
    com.microsoft.sqlserver.jdbc.SQLServerException: Invalid object name 'GEACUPAX.INFORMATION_SCHEMA.SCHEMATA'.
    The command Database Adapter tried to execute was:
    (from jdev log:) select schema_name from GEACUPAX.INFORMATION_SCHEMA.SCHEMATA order by schema_name;
    Note, the schema name has changed to uppercase. I think that is the problem. If I try this query in SQLDeveloper, it returns the same error. I can fix it changing the schema name to “GEACupax”. The case matters.
    Any ideas?
    Leandro.

    Vijay,
    Thanks for you reply.
    I figure out a related bug:
    Bug 12859472: Cannot browse store procedure in case-sensitive MS SQL Database
    There are two possible workarounds:
    1. Use a database name with capital letters
    2. Do not use stored procedures, but access the tables directly.
    The notes on the Bug ticket describes that the issue would be scheduled to be fixed in PS7 which is 11.1.1.8.
    Cheers!
    Leandro.

  • Database Adapter Configuration Execute Pure SQL

    Hii
    I have following scenario in my Project.
    I have ERRORCODE Details Table in Database which has following columns.
    1)ERRORCODE VARCHAR2
    2)PRIORITY VARCHAR2
    3)QueueName Varchar2
    I have one web service which takes errorcode as input parameter of string type in which i have to pass values like 1,2,3.
    Web service treated these values as complete one string value but i want it should be treated like seperately.Beacuse i have to pass these values to the query.
    I have configured database adapter for the following query using Execute Pure SQL.
    SELECT DISTINCT QueueName FROM ErrorCodeDetails where priority= (select min (priority) from ErrorCodeDetails where ErrorCode In(#ERRORCODE))
    So can anyone please help me what changes i have to make in this query so the sql query treat the errorcode string value as three different value rather than one single value??
    Thanks in advance.
    Regards,
    Priyanka

    Change the query like this.
    SELECT DISTINCT QueueName FROM ErrorCodeDetails where priority= (select min (priority) from ErrorCodeDetails where ErrorCode In(select csv from xmltable(#ERRORCODE)))
    In case it is required to treat the individual comma separated values in #ERRORCODE as number use the to_number function.
    SELECT DISTINCT QueueName FROM ErrorCodeDetails where priority= (select min (priority) from ErrorCodeDetails where ErrorCode In(select to_number(csv) from xmltable(#ERRORCODE)))
    In case this helps , please mark the answer as correct/helpful.
    Regards.

  • Database adapter not returning error immediately in table space error.

    Hi,
    In my BPEL process I have an invoke activity to call Database adapter for a PL/SQL procedure invocation.
    The adapter received TABLESPACE error. The wiered thing is the error response we got after 3 hours? I am expecting immediately.
    How do I need to configure this?
    Here is more about my process.
    My BPEL process is an asynchronous process. Before and after the database adapter call I have a java embeded activity with checkpoint();
    retryIntervalValue is 60.
    Is there any thing I have to specify? Why it is taking 3 hours? is there a way to reduce this?
    -- Khaleel

    Hi. Is this still a problem or is it solved? As far as I know how BPEL works this can not really take 3 hours before erroring. You are the one that knows the application best so you can check some things. Maybe the time reported is from the database machine on which time is set different from BPEL machine? What database are you using? Is it Oracle? I guess so. What version? I assume the BPEL repository is in different database from DB Adapter? Can you confirm that checkpoint() is really done? What error is exactly thrown from DB Adapter? How does your BPEL process start? Is it adapter-driven and is the process XA-Transacted? In that case the whole process could be in retry for a longer period of time.
    Regards,
    Jos Baan

  • Sql queries in database adapter

    Hi,
    I want to write, say, 2 select statements in the database adapter. How can I accomadate using "execute pure sql"?
    Regards,
    Aasta

    maybe these links will help you :
    Urgent : Fault Policies in 11g
    http://download.oracle.com/docs/cd/E15523_01/integration.1111/e10226/soacompapp_mang.htm
    http://www.it-eye.nl/weblog/2009/12/10/using-fault-management-framework-in-oracle-11g/
    http://download.oracle.com/docs/cd/E12839_01/integration.1111/e10224/med_faulthandling.htm#SOASE274

  • Java.sql.SQLException: Invalid column index in database adapter

    I have a query that works fine if I run the sql in a JDeveloper SQL editor, but I get a "java.sql.SQLException: Invalid column index" error if I paste it in a database adapter. If I put this query in the adapter:
    select <column>
      from <table>
       where <column> in (select
        trim( substr (txt,
              instr (txt, ',', 1, level  ) + 1,
              instr (txt, ',', 1, level+1)
                 - instr (txt, ',', 1, level) -1 ) )
          as token
        from (select ','||#bindVariable||',' txt
                from dual)
      connect by level <=
         length(#bindVariable)-length(replace(#bindVariable,',',''))+1)I get the error. But if I just put the sub query in the adapter as:
    select
        trim( substr (txt,
              instr (txt, ',', 1, level  ) + 1,
              instr (txt, ',', 1, level+1)
                 - instr (txt, ',', 1, level) -1 ) )
          as token
        from (select ','||#bindVariable||',' txt
                from dual)
      connect by level <=
         length(#bindVariable)-length(replace(#bindVariable,',',''))+1the error goes away. Does anyone know what might be causing this?
    Thanks in advance

    Hi,
    Could you please make sure your binding style(Oracle Positional,Oracle named..etc) of the Seeded VO and Custom Vo are same.
    This is the option you will get when you are extending your vo. So make sure that both are same.
    You can refer the below link too
    VO extension leads to "Invalid column index" exception
    Thanks
    Bharat

  • Build dynamic SQL query in Database Adapter.

    Hi All,
    I have a requirement to build dynamic sql query at Database Adapter.
    My BPEL process is getting search spec as input from siebel. I need to process this searchspec in BPEL and need to build the SQL query dynamically at Database Adapter to fetch the records from DB.
    it goes like this....
    1. Sieble Search Spec: city1 OR city2 OR city3 OR city4 .....
    I need to build query as
    select * from S_ADDR_PER where city like 'city1' OR city like 'city2' OR city like 'city3' OR city like 'city4' ......
    2. Siebel Search spec: city1 AND country1 AND state1....
    I need to build query as
    Select * from S_ADDR_PER where city like 'city1' AND country like 'country1' AND state like 'state1' ....
    3. Siebel Search spec: state
    I need to build query as
    select * from S_ADDR_PER where state like '%state%';
    Is it feasible in Database Adapter? if its Yes.
    Any guidelines to achieve this?
    Thank you
    Chandra

    Hi All,
    I have a requirement to build dynamic sql query at Database Adapter.
    My BPEL process is getting search spec as input from siebel. I need to process this searchspec in BPEL and need to build the SQL query dynamically at Database Adapter to fetch the records from DB.
    it goes like this....
    1. Sieble Search Spec: city1 OR city2 OR city3 OR city4 .....
    I need to build query as
    select * from S_ADDR_PER where city like 'city1' OR city like 'city2' OR city like 'city3' OR city like 'city4' ......
    2. Siebel Search spec: city1 AND country1 AND state1....
    I need to build query as
    Select * from S_ADDR_PER where city like 'city1' AND country like 'country1' AND state like 'state1' ....
    3. Siebel Search spec: state
    I need to build query as
    select * from S_ADDR_PER where state like '%state%';
    Is it feasible in Database Adapter? if its Yes.
    Any guidelines to achieve this?
    Thank you
    Chandra

  • Dynamically Pass sql query in Database adapter

    hi',
    How can we dynamically pass sql query in Database adapter, is there any way, I am using SOA 11G.
    Thanks
    Yatan

    Hi,
    Tried that too. No luck. Gives me this.
    The selected operation process could not be invoked.
    An exception occured while invoking the webservice operation. Please see logs for more details.
    oracle.sysman.emSDK.webservices.wsdlapi.SoapTestException: Exception occured when binding was invoked.
    Exception occured during invocation of JCA binding: "JCA Binding execute of Reference operation 'selectUsingIn' failed due to: Pure SQL Exception.
    Pure SQL Execute of select interface_id, property_name, property_value from ( (?) ) failed.
    Caused by java.sql.SQLSyntaxErrorException: ORA-00903: invalid table name
    The invoked JCA adapter raised a resource exception.
    Please examine the above error message carefully to determine a resolution.
    Regards,
    Neeraj Sehgal

  • Different ways to return results using a stored proc to calling application

    Hi, Can someone please suggest me different ways of returning results( set of rows and columns) from a stored procedure to calling application.
    Currently I am using sys_refcursor to return results to front end. Stored proc is executed fast, but cursor access and retrieval of results has some overhead.
    So can you suggest the ways which will be faster than this approach.
    Thanks.

    Currently the procedure executes quickly but the results from the ref cursor are returned slowly, this is because the query is slow, for whatever reason.
    Collecting in all the rows in the stored procedure first before returning them will
    a) Make the stored procedure slower taking the same amount of time to execute as current query takes to complete.
    b) Use more memory.
    c) Put more stress on the network as all rows will be transferred at once instead of using the arraysize/fetchsize to to fetch the rows in smaller packets.

Maybe you are looking for

  • Locating Lost or Stolen iPad or iPhone

    Basically, this is a posting for BOTH Apple and mobile device users.  It contains suggestions for Apple and tips for user who have lost a trackable device (iPad, iPhone, iPod Touch, etc). Recently we misplaced an iPad in an Orlando airport.  After se

  • ORA-01242: data file suffered media failure: database in NOARCHIVELOG mode

    Hi All, Need help from the gurus. Currently we are in state unable to do anything. Was using a database and all of a sudden it crashed. Tried to mount the database, open it, it failed. Also tried the recover and alter database open, even that failed.

  • Default Payment Terms on BP2BP B1i Scenario

    Hello Expert, I have designed Business partner to Business Partner scenario from One source to multiple company which is working fine on Live environment, Few BP entries are not posted due to following reason. Source company Payment terms are not pre

  • Java httpservlet and php

    Hi. I'm trying to work out an interface in php for a java http servlet. But i have some problems when i try to redirect my response to the php page. Any idea how i can do this (or if i can do this)?

  • Please fix the compatibility issue regarding google tool bar

    I have now FF5 and this version is NOT compatible with Google Tool Bar. I have all of my favorites and bookmarks on that tool. I do not and will not use the bookmark feature in FF. Google is everywhere and I can access it most places and feel it is a