Query Returning Multiple Rows

I have a problem with a query that includes 5 tables!
Equipment ec, (ec.cost, ec.workid)
Material mc, (mc.cost, mc.workid)
Labor lc, (lc.cost, lc.workid)
Work wo, (wo.workid)
Entity en
The primary key is the work id
The columns I need to extract are all the same - "cost"
The problem is that I need to extract the costs from all the tables (equipment/labor/material) where the work "id" is equal to the work "id".
The work table has a unique wo.workid but the other three tables can have
multiple nn.workid ('s).
This is the query I am working from at this time...
SELECT distinct wo.workid, wo.description, wo.supervisor, wo.acctnum,
wo.shop, wo.woaddress, wo.initiatedate,
TO_NUMBER (TO_CHAR (wo.initiatedate, 'MM')) AS mnth,
TO_NUMBER (TO_CHAR (wo.initiatedate, 'YYYY')) AS yr,
wo.actualfinishdate, wo.assetgroup, wo.unitsaccompdesc,
wo.unitsaccomplished,
sum(decode (lc.cost, 0, null, lc.cost)) labour_cost,
lc.laborname AS labour_name,
SUM (decode(mc.COST, 0, null, mc.cost)) AS material_cost,
mc.description AS mat_desc,
SUM (decode(ec.COST, 0, null, ec.cost)) AS equipment_cost,
ec.description AS equip_desc, en.module
FROM work wo,
equipment ec,
material mc,
labor lc,
entity en
WHERE (lc.COST <> 0 AND mc.COST <> 0 AND ec.COST <> 0)
AND wo.applytoentity = en.code
AND mc.workid = wo.workid
AND ec.workid = wo.workid
AND lc.workid = wo.workid
GROUP BY wo.workid,
wo.description,
wo.supervisor,
wo.acctnum,
wo.shop,
wo.woaddress,
wo.initiatedate,
wo.actualfinishdate,
wo.assetgroup,
wo.unitsaccompdesc,
wo.unitsaccomplished,
lc.COST,
lc.laborname,
mc.COST,
mc.description,
ec.COST,
ec.description,
en.module
any help would be appreciated!

Hi John...
I am still getting duplicate values.
When the query grabs a value from the labour table it also grabs the values from the other tables and puts them in the same row... There are many rows in the three costs
tables and only one in the work table.
I have a dump of the rows but I cannot find a way to save it here.
Here is a cut down version of the data I am retrieving.
ID DESCRIPTION LAB MAT EQUIP
345     General Building Interior Maintenance Activities          136.60     59.89     133.60
345     General Building Interior Maintenance Activities          64.38     59.89     133.60
345     General Building Interior Maintenance Activities          42.92     59.89     133.60
345     General Building Interior Maintenance Activities          91.28     59.89     133.60
345     General Building Interior Maintenance Activities          374.24     59.89     133.60
345     General Building Interior Maintenance Activities          182.56     59.89     133.60
345     General Building Interior Maintenance Activities          175.68     59.89     133.60
345     General Building Interior Maintenance Activities          48.80     59.89     58.80
345     General Building Interior Maintenance Activities          89.48     59.89     58.80
345     General Building Interior Maintenance Activities          79.80     59.89     58.80
345     General Building Interior Maintenance Activities          294.88     59.89     58.80
345     General Building Interior Maintenance Activities          24.92     59.89     58.80
345     General Building Interior Maintenance Activities          147.44     59.89     58.80
345     General Building Interior Maintenance Activities          182.56     59.89     58.80
345     General Building Interior Maintenance Activities          98.59     59.89     58.80
345     General Building Interior Maintenance Activities          126.84     59.89     58.80
345     General Building Interior Maintenance Activities          55.00     59.89     6,656.00
345     General Building Interior Maintenance Activities          182.56     59.89     6,656.00
345     General Building Interior Maintenance Activities          98.59     59.89     6,656.00
345     General Building Interior Maintenance Activities          191.36     59.89     6,656.00
345     General Building Interior Maintenance Activities          136.60     59.89     66.96
345     General Building Interior Maintenance Activities          55.00     59.89     66.96
345     General Building Interior Maintenance Activities          491.04     59.89     66.96
345     General Building Interior Maintenance Activities          24.92     59.89     66.96
345     General Building Interior Maintenance Activities          182.56     59.89     66.96
345     General Building Interior Maintenance Activities          110.00     59.89     66.96
345     General Building Interior Maintenance Activities          162.80     59.89     66.96
345     General Building Interior Maintenance Activities          85.84     59.89     66.96
345     General Building Interior Maintenance Activities          65.44     59.89     66.96
345     General Building Interior Maintenance Activities          64.38     59.89     736.00
345     General Building Interior Maintenance Activities          79.80     59.89     736.00

Similar Messages

  • Return Code - Query for Multiple Rows as XML

    Hi,
    I'm executing an MSSQL stored procedure through the "Query for Multiple Rows as XML" activity in LiveCycle ES. I do this through a call statement such as this:
    { call MyStoredProc(?) }
    This works great, the stored procedure always returns a record set (with or without records). I use this activity rather than "Call Stored Procedure" because I can transform the record set into XML right away within this activity. Unfortunately any exception arising from invoking this stored procedure cannot be handled within the workflow as this activity does not have an exception handler (lightning bolt). In an attempt to handle at least some exceptions we have decided to use try/catches within the stored procedures and return different error codes. Now the problem I am faced with is that there is no way to retrieve the returned code within any of the SQL activities. We don't want to have to write an execute script for each of these SQL calls. Is there any way to do this? Seems like I'm 95% there.
    Thanks
    Nic

    Thanks for the offer, unfortunately we would need something certified by Adobe.
    Nic

  • The simplest way for plsql procedure to return multiple rows

    Hi,
    What is the simplest way for plsql procedure to return multiple rows (records). There are many combination of ways to do it but I am looking for a solution that is appropriate for plsql beginners. Many solutions use cursors, cursor variables, collections and more that kind of things that are complex on the face of it. Is it somehow possible to achieve the same with less effort?
    Sample query would be: SELECT * FROM EMPLOYEES;
    I want to use returned rows in APEX to compose APEX SQL(in that context plsql) report.
    It is enough to use just SELECT * FROM EMPLOYEES query in APEX but I want to use plsql procedure for that.
    Thank you!

    Hi,
    It depends :-).
    With +...that is appropriate for plsql beginners...+ in mind... it still depends!
    The list of techniques (ref cursors, cursor variables, collections, arrays, using explict SQL) you have referenced in your post can be made to work. but...
    +Is it somehow possible to achieve the same with less effort?+ Less effort : That needs to be defined (measured). Especially in the context of pl/sql beginners (who is a beginner?) .
    What is the level of "programming experience" ?
    What is the level of understanding of "Relational Result set" as processible in Oracle?
    If you are looking for
    Process_the_set_of rows_in APEX () kind of capabilitywhich "abstracts/hides" relation database from developers when working on relation database, it may not be the best approach (at least strategically). Because I believe it already is abstracted enough.
    I find REF CUROSOR most effective for such use, when the "begginer" has basic understanding of processing SQL result set .
    So in a nut shell, the techniques (that you already are familiar with) are the tools available. I am not aware of any alternative tools (in pure Oracle) that will simplify / hide basics from develpers.
    vr,
    Sudhakar B.

  • TimesTen SQL with group by returning multiple rows

    I have a Active-Standby TimesTen nodes.
    Using group by with or without having clause:
    Whenever I do a group by query on table1 table with or without having clause, SQL returns multiple rows. This looks very strange to me. Each time it gives different count
    Command> select count(*) from table1 group by pname having pname='pool';
    < 390400 >
    1 row found.
    Command> select count(*) from table1 group by pname having pname='pool';
    < 390608 >
    < 32639 >
    2 rows found.
    Command> select count(*) from table1 group by pname having pname='pool';
    < 2394 >
    < 351057 >
    2 rows found.
    Command> select count(*) from table1 group by pname having pname='pool';
    < 305732 >
    1 row found.
    Command> select count(*) from table1 group by pname having pname='pool';
    < 420783 >
    1 row found.
    Command> select count(*),pool_name from root.rms_address_pools group by pool_name order by pool_name;
    < *435473, pool* >
    < *32313, pool* >
    < 453, smvG3 >
    < *28980, pool* >
    < 3786, smvG4 >
    < *26025, pool* >
    < 236120, smvG6 >
    < 131455, smcG3 >
    < *65150, pool* >
    < 23, snt1G1 >
    < 510, snt2G1 >
    < 510, snt2G2 >
    Using where clause:
    Command> select count(*) from table1 where pname='pool';
    < *442354* >
    1 row found.
    Command> select count(*) from table1 where pname='pool';
    < 442354 >
    1 row found.
    Table description:
    Command> desc table1;
    Table table1:
    Columns:
    *IP_ADDRESS                      BIGINT NOT NULL
    PNAME CHAR (32) NOT NULL
    SITEID TINYINT NOT NULL
    1 table found.
    ttVersion:
    bash-3.00# ./ttVersion
    TimesTen Release *7.0.3.1.0 (64 bit Solaris)* (tt70:17001) 2007-10-30T22:17:07Z
    Instance admin: root
    Instance home directory: /TimesTen/tt70
    Daemon home directory: /var/TimesTen/tt70
    bash-3.00#
    Could any one suggest what is wrong with my SQL? or is it a bug with TimesTen?
    Many thanks in advance.
    Br,
    Brij

    Hi Gena,
    When i execute the query with where clause, it gives me the output with more than one pool:
    Command> select pname, count (*) from table1 where pname='pool' group by pname ;
    < smcG3 , 18836 >
    < pool , 423527 >
    2 rows found.
    Command> select pname, count (*) from table1 where pname='pool' group by pname ;
    < intG302 , 17202 >
    < pool , 425159 >
    2 rows found.
    While if give use the having clause it gives me multiple rows for one pool only ( sometimes) :
    select pname, count (*) from table1 group by pname having pname='pool';
    < pool , 32686 >
    < pool , 420445 >
    2 rows found.
    select pname, count (*) from table1 group by pname having pname='pool';
    < pool , 393574 >
    < pool , 5838 >
    < pool , 110943 >
    3 rows found.
    Command> select pname, count (*) from table1 group by pname having pname='pool';
    < pool , 414590 >
    < pool , 8395 >
    2 rows found.
    Please suggest what can be done in this case, need i open a case with Oracle for this.
    Regards, Brij

  • ...where like ('% query returning mul rows %') - how?

    Hi
    I have a situation where in my main query's where clause I have to use like ('% <value returned from query2>%'). However, my query2 can return multiple rows.
    It is something like this:
    Select .....
    from table1 t1
    where path like ('%<query2>%').
    Path can have multiple values - it is just representing a parent child relationship like 1/2/3. 1 is a parent of 2. 2 is a parnt of 3 and so on. What I get from query2 could be either of these. So I have to use like and not in. How may I achieve this?

    select lvl,
           Path
      from (select distinct level as lvl,
                   sys_connect_by_path(parent,'/') Path
              from table1 t1
            connect by prior child = parent)
    where instr(path,((select parent                                                                   --+
                          from (select parent, sm, rank() over (order by sm desc) r                       |
                                  from (SELECT parent, SUM(CT1) as sm                                     |
                                          FROM ((select parent,count(child) ct1                           |
                                                   from table1 t1                                         |
                                                  where group by parent                                   |
                                        -- end level 1)                                                   |
                                        UNION ALL                                                         |
                                        (select parent, count(child) ct2                                  | try to move this sub-query
                                           from table1 t1                                                 | at the FROM clause
                                          where child in --first level                                    |
                                                (select parent                                            |
                                                   from (select distinct parent,count(child) ct1          |
                                                           from table1 t1                                 |
                                                          where group by parent) q1)-- end level 1        |
                                                 group by parent))--MAIN SEL                              |
                         GROUP BY parent))                                                                |
                        where r =1))) > 0--end instr                                                    --+
       and lvl = 1
    you may try to move sub-queries in your WHERE clause to the FROM clause.
    Message was edited by:
    Warren Tolentino
    justin has the same idea :D

  • Single query return multiple value

    Hi ALL,
    I have a sql query as below :
    select order_number,
    (select decode(hcp.contact_point_purpose,'ABC',hcp.email_address,'CDE',hcp.email_address,null)
    from hz_contact_points,
    hz_parties hz
    WHERE hz.party_id=hcp.owner_table_id) Email
    FROM oe_order_headers_all h
    WHERE h.order_number='102'
    Actually the problem i am facing is the inner select query is returning multiple row , so my main query is erroring out, i need to capture the multiple row.
    in the above example the inner decode statement returning two mail address, i need to capture that, but while executing the whole query it is erroring out as saying single query returns multiple values.
    please help me on this to capture multiple values
    Thanks

    >
    select order_number,
    (select decode(hcp.contact_point_purpose,'ABC',hcp.email_address,'CDE',hcp.email_address,null)
    from hz_contact_points,
    hz_parties hz
    WHERE hz.party_id=hcp.owner_table_id
    /* a join is missing here that points to table oe_order_headers_all h*/) Email
    FROM oe_order_headers_all h
    WHERE h.order_number='102'
    >
    I can see a join missing in your select sub query.
    However, if you you are still getting the single query return multiple value error then you need to replace the sql sub query
    select decode(hcp.contact_point_purpose,'ABC',hcp.email_address,'CDE',hcp.email_address,null)
    from hz_contact_points,
    hz_parties hz
    WHERE hz.party_id=hcp.owner_table_id)by decode(hcp.contact_point_purpose,'ABC',hcp.email_address,'CDE',hcp.email_address,null)
    and join the two tables in you main query..
    Regards
    Biju
    ED: Provide test script and your expected output to get what you want exacly!
    Edited by: biju2012 on Sep 7, 2012 12:06 AM

  • How to create a function that returns multiple rows in table

    Dear all,
    I want to create a funtion that returns multiple rows from the table (ex: gl_balances). I done following:
    -- Create type (successfull)
    Create or replace type tp_gl_balance as Object
    PERIOD_NAME VARCHAR2(15),
    CURRENCY_CODE VARCHAR2(15),
    PERIOD_TYPE VARCHAR2(15),
    PERIOD_YEAR NUMBER(15),
    BEGIN_BALANCE_DR NUMBER,
    BEGIN_BALANCE_CR NUMBER
    -- successfull
    create type tp_tbl_gl_balance as table of tp_gl_balance;
    but i create a function for return some rows from gl_balances, i can't compile it
    create or replace function f_gl_balance(p_period varchar2) return tp_tbl_gl_balance pipelined
    as
    begin
    return
    (select gb.period_name, gb.currency_code, gb.period_type, gb.period_year, gb.begin_balance_dr, gb.begin_balance_cr
    from gl_balances gb
    where gb.period_name = p_period);
    end;
    I also try
    create or replace function f_gl_balance(p_period varchar2) return tp_tbl_gl_balance pipelined
    as
    begin
    select gb.period_name, gb.currency_code, gb.period_type, gb.period_year, gb.begin_balance_dr, gb.begin_balance_cr
    from gl_balances gb
    where gb.period_name = p_period;
    return;
    end;
    Please help me solve this function.
    thanks and best reguard

    hi,
    Use TABLE FUNCTIONS,
    [http://www.oracle-base.com/articles/9i/PipelinedTableFunctions9i.php]
    Regards,
    Danish

  • Pl/sql block returning multiple rows

    Hi,
    I've created a plsql block which obtains an id from a name and then uses this id in another sql statement. The select statement to get the id works fine and the correct id is placed into the variable awardID.
    when i try to use this variable in another select statement it returns multiple rows. but when i just use the id in the select statement it works fine.
    select AwardID into awardID
    from award_objtabA
    where Name = awardName;
    this returns the correct id '5999'
    select Points into award_points
    from award_objtabA
    where AwardID = awardID;
    this returns multiple rows
    select Points into award_points
    from award_objtabA
    where AwardID = 5999;
    this works fine
    can anybody help with this confusing error?
    Cheers

    select AwardID
      into awardID               <= the same column
      from award_objtabA
    where Name = awardName;
    this returns the correct id '5999'
    select Points
      into award_points
      from award_objtabA
    where AwardID = awardID;    <= the same column
    this returns multiple rows
    to solve use different name not exactly the same as that of the column name
    select AwardID
      into vAwardID        
      from award_objtabA
    where Name = awardName;
    select Points
      into award_points
      from award_objtabA
    where AwardID = vAwardID;as Alex and Kamal have suggested use different name for your variable.

  • XML attributes makes my query return no rows

    Hello everyone,
    I've an odd problem.
    I'm querying some XML, but the attributes in one of the tags make my query return no rows; if I remove the attributes, then the query works as expected.
    The XML is below; it's the attributes in the Report tag that cause the issues:
    <result errorCode="0">
         <return>
              <Report
                   xsi:schemaLocation="Items_x0020_status_x0020_information http://******-****/ReportServer?%2FReports%2FContent%20Producer%20Reports%2FItems%20status%20information&amp;rs%3AFormat=xml&amp;rc%3ASchema=True"
                   Name="Items status information" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                   xmlns="Items_x0020_status_x0020_information">
                   <Tablix1>
                        <Details_Collection>
                             <Details ItemId="914P7" Username="test" user_role="IT"
                                  first_name="Barry" last_name="Donovan" organisation=""
                                  content_format="On_Screen" modified_date="26/05/2011 13:16:49"
                                  item_status="Draft" status_date="" component_name="" demand="" />
                        </Details_Collection>
                   </Tablix1>
              </Report>
         </return>
    </result>My query is:
         select
                a.item_id
               ,a.username
               ,a.user_role
               ,a.first_name
               ,a.last_name
               ,a.supplier_id
               ,a.format
               ,a.modified_date
               ,a.item_status
               ,a.completion_date
               ,a.component_code
             from   dual
                   ,xmltable
                    ('/result/return/Report/Tablix1/Details_Collection/Details'
                       passing p_xml
                       columns
                          item_id         varchar2(1000) path '@ItemId'
                         ,username        varchar2(1000) path '@Username'
                         ,user_role       varchar2(1000) path '@user_role'
                         ,first_name      varchar2(1000) path '@first_name'
                         ,last_name       varchar2(1000) path '@last_name'
                         ,supplier_id     varchar2(1000) path '@organisation'
                         ,format          varchar2(1000) path '@content_format'
                         ,modified_date   varchar2(1000) path '@modified_date'
                         ,item_status     varchar2(1000) path '@item_status'
                         ,completion_date varchar2(1000) path '@status_date'
                         ,component_code  varchar2(1000) path '@demand'
                    ) a;I've tried stripping out the attributes in the tag, which does work, but some of the XML I'm expecting back may be quite large (many records), so that caused issues in itself. I'd rather deal with it and not mess with the XML itself if possible.
    Any help would be hugely appreciated!
    Thank you very much in advance.
    Robin
    Edited by: User_resU on Apr 12, 2012 2:50 PM

    Example:
    SQL> ed
    Wrote file afiedt.buf
      1  with t as (select xmltype('<result errorCode="0">
      2     <return>
      3             <Report
      4                     xsi:schemaLocation="Items_x0020_status_x0020_information http://******-****/ReportServer?%2FReports%2FContent%20Producer%20Reports%2FItems%20status%20information&amp;rs%3AFormat=xml&amp;rc%3ASchema=True"
      5                     Name="Items status information" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      6                     xmlns="Items_x0020_status_x0020_information">
      7                     <Tablix1>
      8                             <Details_Collection>
      9                                     <Details ItemId="914P7" Username="test" user_role="IT"
    10                                             first_name="Barry" last_name="Donovan" organisation=""
    11                                             content_format="On_Screen" modified_date="26/05/2011 13:16:49"
    12                                             item_status="Draft" status_date="" component_name="" demand="" />
    13                             </Details_Collection>
    14                     </Tablix1>
    15             </Report>
    16     </return>
    17  </result>') as xml from dual)
    18  --
    19  -- end of test data
    20  --
    21       select
    22              a.item_id
    23             ,a.username
    24             ,a.user_role
    25             ,a.first_name
    26             ,a.last_name
    27             ,a.supplier_id
    28             ,a.format
    29             ,a.modified_date
    30             ,a.item_status
    31             ,a.completion_date
    32             ,a.component_code
    33           from   t
    34                 ,xmltable
    35                  (xmlnamespaces('Items_x0020_status_x0020_information' as "x0"),
    36                   '//x0:Report/x0:Tablix1/x0:Details_Collection/x0:Details'
    37                     passing xml
    38                     columns
    39                        item_id         varchar2(1000) path '@ItemId'
    40                       ,username        varchar2(1000) path '@Username'
    41                       ,user_role       varchar2(1000) path '@user_role'
    42                       ,first_name      varchar2(1000) path '@first_name'
    43                       ,last_name       varchar2(1000) path '@last_name'
    44                       ,supplier_id     varchar2(1000) path '@organisation'
    45                       ,format          varchar2(1000) path '@content_format'
    46                       ,modified_date   varchar2(1000) path '@modified_date'
    47                       ,item_status     varchar2(1000) path '@item_status'
    48                       ,completion_date varchar2(1000) path '@status_date'
    49                       ,component_code  varchar2(1000) path '@demand'
    50*                 ) a
    SQL> /
    ITEM_ID
    USERNAME
    USER_ROLE
    FIRST_NAME
    LAST_NAME
    SUPPLIER_ID
    FORMAT
    MODIFIED_DATE
    ITEM_STATUS
    COMPLETION_DATE
    COMPONENT_CODE
    914P7
    test
    IT
    Barry
    Donovan
    On_Screen
    26/05/2011 13:16:49
    Draft

  • Problem with database control returning multiple rows as Array  using Oracle

    Has anybody using Oracle gotten a Database control that
    returns multiple rows to work returning an array?
    The only way I can seem to return multiple rows is by returning
    a RowSet. Returning an array gives me a NullPointerException
    (when called within a pageFlow). When calling a database control
    that returns an array from a web service I get a
    "java.sql.SQLException: ResultSet has no more data." error.
    The samples using the pointbase database seem to work, but when I
    converted the CustomerDBClient web service to use Oracle, it starts
    failing on calling the database control that returns an array
    with: "java.sql.SQLException: ResultSet has no more data."
    Has anybody gotten this to work using Oracle?
    I'm also having some problem returning an Iterator. It seems
    to work when called from a web service, but returns nothing
    if called from a page flow.
    I'm using Oracle 8.1.7 and WebLogic 8.1.
    Eric

    Do you need a particular service pack installed to return an array of custom object?
    I am getting a ResultSet contained no data error when trying.
    Thanks,
    -Thomas
    "Robin Karlin" <[email protected]> wrote:
    >
    Eddie O'Neil <[email protected]> wrote:
    All--
    Unfortunately, returning an Iterator to a JPF (or JSP) from a
    database control is broken in WLW 8.1, though it will work inside of
    a
    JWS or JCS.
    There shouldn't be a problem with returning an array of objects out
    of Oracle to the JPF, and if you need an Iterator specifically, youcan
    wrap the array in an Iterator implementation.
    Sorry for the inconvenience.
    Eddie
    Lenny wrote:
    I have gotten it to work on Oracle using Array:)
    However, I haven't gotten it to work on Oracle using Iterator:( Itis so
    simple, but doesn't work:(
    "Eric Dokken" <[email protected]> wrote in message
    news:[email protected]...
    Has anybody using Oracle gotten a Database control that
    returns multiple rows to work returning an array?
    The only way I can seem to return multiple rows is by returning
    a RowSet. Returning an array gives me a NullPointerException
    (when called within a pageFlow). When calling a database control
    that returns an array from a web service I get a
    "java.sql.SQLException: ResultSet has no more data." error.
    The samples using the pointbase database seem to work, but when I
    converted the CustomerDBClient web service to use Oracle, it starts
    failing on calling the database control that returns an array
    with: "java.sql.SQLException: ResultSet has no more data."
    Has anybody gotten this to work using Oracle?
    I'm also having some problem returning an Iterator. It seems
    to work when called from a web service, but returns nothing
    if called from a page flow.
    I'm using Oracle 8.1.7 and WebLogic 8.1.
    Eric
    I get the same error that Eric reported when trying to return an Array
    of objects.
    It is really frustrating because I can't use much of the built-in control
    logic
    that WLW provides. All I did was create a data pool for Oracle and a
    datasource.
    I modified the sample app in C:\bea81\weblogic81\samples\workshop\SamplesApp\WebApp\callJavaControl
    to point to that datasource and I get the error that Eric reports above.
    Can
    anyone help me out????
    Thanks,
    Robin

  • JDeveloper + WebServices, RETURN multiple rows from pl/sql

    I need to return multiple rows from pl/sql procedure or function and publish it as a Web Service through JDeveloper.
    I try to use ref cursor, but then found that it is impossible to use ref cursor as a return value in Web Services.
    Please, help me to achieve result.

    Hello. I tried to make commands from article, but got errors
    "C:\Program Files\Java\jdk1.6.0_18\bin\java" -jar D:\oracle\Middleware\oracle_common\modules\oracle.webservices_11.1.1\wsa.jar -plsqlAssemble -appName Echo -sql wo -dataSource jdbc/OracleManagedDS -dbConnection jdbc:oracle:thin:@192.168.246.2:1521:data -dbUser syd/manager -style rpc -use encoded
    Error: Interface oracle.generated.wo: The class could not be loaded from the class path.

  • Custom database functoid to return multiple rows from database

    Hi,
    I have created a custom database fucntoid to execute a stored procedure which returns just single row from the database.But I could not manage to return multiple rows from the database.
    Does anyone know how to return multiple rows from DB and create a node with that many occurrences in the target schema?
    Thanks
    JB

    If you want to do this in messaging-only way without orchestration, then only option let to you is using .NET in BizTalk:
    We had similar requirement with one of our clients, where they didn’t want to use orchestration (though we emphasised on less impact orch would have compared to manageability),
    they still wanted to have pure-messaging only.
    We extended the custom XslTransform component that ships with BizTalk SDK (<BizTalk installation directory>\SDK\Samples\Pipelines\XslTransformComponent)).
    Created a custom disassembler pipeline component, used the XslTransform component from SDK to execute the map’s XSLT. Here we created a map with every links except the database ones. After executing the map, access the database, execute the store procedure
    which returns more than one row/dataset, enrich the XSLT transformed message with the dataset from your database in disassembler.
    Since .NET gives you the flexibility of access the dataset with more than one row, you can enrich the message in custom pipeline code.
    Other option is code the message transformation completely in .NET code in custom disassembler by passing the received message to method/code which would code the map/enrichment.
    While enriching you can execute the store procedure which returns more than one row/dataset, enrich the message further with the dataset from db.
    If this answers your question please mark it accordingly. If this post is helpful, please vote as helpful by clicking the upward arrow mark next to my reply.

  • Procedure from PowerBuilder returning multiple rows

    In want to call a procedure from PowerBuilder which return multiple rows. I would like to know how to write the procedure and also how to call it. I tried using REFCURSOR , but i heard that Powerbuilder doesnot support REFCURSOR . Please help
    Thanks in advance

    This is not a PL/SQL qustion, but a Powerbuilder question.
    Just what SQL constructs does Powerbuilder supports? And if there is no support for ref cursors, then the choice of using a client language that lacks basic core SQL support is questionable.

  • Print Child SQL which is returning multiple rows to single colum.

    I have a requirement to print both Parent and Child SQLs rows to single row.
    For Ex:
    Parent row is returning single row
    Id, Name, Primary Rate.
    101, LName,FName ,30
    Child row is returning multiple rows
    Id, Name, Secondary Rate
    101, LName,FName,15
    101, LName,FName,10
    The end result should be
    101,LName,FName,30,15,10
    Any suggestions please?

    Below is the XML TAG
    <LIST_EMPLOYEERATE>
    <EMPLOYEERATE>
    <EMPNUMBER>112</EMPNUMBER>
    <EMPNAME>Aaron</EMPNAME>
    <PAYRATE>38.09</PAYRATE>
    <JOBNAME>Technician</JOBNAME>
    <EMPTYPE>Salary</EMPTYPE>
    <LIST_ADDRATE>
    <ADDRATE>
    <ADDPAYRATE>26</ADDPAYRATE>
    </ADDRATE>
    <ADDRATE>
    <ADDPAYRATE>7.9</ADDPAYRATE>
    </ADDRATE>
    </LIST_ADDRATE>
    </EMPLOYEERATE>
    </LIST_EMPLOYEERATE>
    The Result should be (assume this is going onto excel spread sheet)
    EmpNum EmpName Rate EmpType Rate1 Rate2
    112 Aaron 38.09 Salary 26 7.9
    Using @inline we are able to get 26 and 7.9 on the same line, but how to push 7.9 to next column?
    Thanks!

  • PL-SQL Returning multiple rows

    hi all
    i am using an oracle 8i database.My front end application is a JSP code which calls an oracle procedure.How do i pass a pl-sql table or an equivalent to a jave code since the procedure has to return multiple rows.i have been told that the jdbc driver version
    (1.0) which we are using does not support this.
    should i go about it differently and use temporary tables?..please help
    thanks
    LA

    hi all
    i am using an oracle 8i database.My front end application is a JSP code which calls an oracle procedure.How do i pass a pl-sql table or an equivalent to a jave code since the procedure has to return multiple rows.i have been told that the jdbc driver version
    (1.0) which we are using does not support this.
    should i go about it differently and use temporary tables?..please help
    thanks
    LA

Maybe you are looking for