How just return one row of a one to many join..

So I have a one to many join where the SMOPERATOR table has data I need however it has a couple of rows that match the JOIN condition in there. I just need to return one row. I think this can be accomplished with a subquery in the join however have not been able to come up with the right syntax to do so.
So:
SELECT "NUMBER" as danumber,
NAME,
SMINCREQ.ASSIGNMENT,
SMOPERATOR.PRIMARY_ASSIGNMENT_GROUP,
SMOPERATOR.WDMANAGERNAME,
SMINCREQ.owner_manager_name,
SMINCREQ.subcategory, TO_DATE('01-'||TO_CHAR(open_time,'MM-YYYY'),'DD-MM-YYYY')MONTHSORT,
(CASE WHEN bc_request='f' THEN 'IAIO'
WHEN (bc_request='t' and substr(assignment,1,3)<>'MTS') THEN 'RARO'
WHEN (bc_request='t' and substr(assignment,1,3)='MTS') THEN 'M'
ELSE 'U' end) as type
from SMINCREQ
left outer join SMOPERATOR on SMINCREQ.assignment=SMOPERATOR.primary_assignment_group
WHERE SMINCREQ.owner_manager_name=:P170_SELECTION and SMOPERATOR.wdmanagername=:P170_SELECTION
AND open_time BETWEEN to_date(:P170_SDATEB,'DD-MON-YYYY') AND to_date(:P170_EDATEB,'DD-MON-YYYY')
AND
(bc_request='f' and subcategory='ACTIVATION' and related_record<>'t')
OR
(bc_request='f' and subcategory<>'ACTIVATION')
OR
(bc_request='t' and substr(assignment,1,3)<>'MTS')
order by OPEN_TIMe

Hi,
This sounds like a Top-N Query , where you pick N items (N=1 in this case) off the top of an orderded list. I think you want a separate ordered list for each assignment; the analytic ROW_NUMBER function does that easily.
Since you didn't post CREATE TABLE and INSERT statements for your sample data, I'll use tables from the scott schema to show how this is done.
Say you have a query like this:
SELECT       d.dname
,       e.empno, e.ename, e.job, e.sal
FROM       scott.dept  d
JOIN       scott.emp   e  ON   d.deptno = e.deptno
ORDER BY  dname
;which produces this output:
DNAME               EMPNO ENAME      JOB              SAL
ACCOUNTING           7934 MILLER     CLERK           1300
ACCOUNTING           7839 KING       PRESIDENT       5000
ACCOUNTING           7782 CLARK      MANAGER         2450
RESEARCH             7876 ADAMS      CLERK           1100
RESEARCH             7902 FORD       ANALYST         3000
RESEARCH             7566 JONES      MANAGER         2975
RESEARCH             7369 SMITH      CLERK            800
RESEARCH             7788 SCOTT      ANALYST         3000
SALES                7521 WARD       SALESMAN        1250
SALES                7844 TURNER     SALESMAN        1500
SALES                7499 ALLEN      SALESMAN        1600
SALES                7900 JAMES      CLERK            950
SALES                7698 BLAKE      MANAGER         2850
SALES                7654 MARTIN     SALESMAN        1250Now say you want to change the query so that it only returns one row per department, like this:
DNAME               EMPNO ENAME      JOB              SAL
ACCOUNTING           7782 CLARK      MANAGER         2450
RESEARCH             7876 ADAMS      CLERK           1100
SALES                7499 ALLEN      SALESMAN        1600where the empno, ename, job and sal columns on each row of output are all taken from the same row of scott.emp, though it doesn't really matter which row that is.
One way to do it is to use the analytic ROW_NUMBER function to assign a sequence of unique numbers (1, 2, 3, ...) to all the rows in each department. Since each sequence startw with 1, and the numbers are unique within a department, there will be exactly one row per departement that was assigned the numebr 1, and we''ll display that row.
Here's how to code that:
WITH     got_r_num     AS
     SELECT     d.dname
     ,     e.empno, e.ename, e.job, e.sal
     ,     ROW_NUMBER () OVER ( PARTITION BY  d.dname
                               ORDER BY          e.ename
                       )         AS r_num
     FROM     scott.dept  d
     JOIN     scott.emp   e  ON   d.deptno = e.deptno
SELECT       dname
,       empno, ename, job, sal
FROM       got_r_num
WHERE       r_num     = 1
ORDER BY  dname
;Notice that he sub-query got_r_num is almost the same as the original query; only it has one additional column, r_num, in the SELECT clause, and the sub-qeury does not have an ORDER BY clause. (Sub-queries almost never have an ORDER BY clause.)
The ROW_NUMBER function must have an ORDER BY clause. In this example, I used "ORDER BY ename", meaning that, within each department, the row with the first ename (in sort order) will get r_num=1. You can use any column, or expression, or expressions in the ORDER BY clause. You muight as well use something consistent and predictable, like ename, but if you really wanted arbitrary numbering you could use a constant in the analytic ORDER BY clause, e.g. "ORDER BY NULL".

Similar Messages

  • How to return all rows with duplicate values? Inner join not working!

    I have a 3 column table:
    location (pk), name, size
    I am attempting to select pairs of entries that have the same
    name and size but different values for location (it is the
    primary key.) My inner join does not seem to return what I need:
    select a.location, a.name, a.size, b.location, b.name, b.size
    from mytable a, mytable b where a.name = b.name and a.size =
    b.size and a.location <> b.location;

    One solution is like this:
    SELECT dname, loc, deptno
    FROM dept
    WHERE (dname, loc) IN
    (SELECT dname, loc
    FROM dept
    GROUP BY dname, loc
    HAVING COUNT (*) > 1
    ORDER BY dname, loc, deptno
    Regards
    Zlatko Sirotic

  • How do i get rows for last one hour

    Guys,
    How do it retrieve rows as of last hour from the database ? I wrote this but doesn't seem to return the rows
    select timestamp from Plan where to_date(timestamp,'DD-MON-RRRR HH24:MI') > to_date(sysdate - 120/1440,'DD-MON-RRRR HH24:MI')
    Thanks
    G

    What version of database are you on?
    some 9i versions, 10g and above have flashback query
    If you want to know what your rows looked like 1 hour ago you an issue a flashback query (you need appropriate privileges to use it)
    eg select * from table_name as of timestamp (sysdate - 1/24)
    where condition.
    If are you looking for all rows inserted in the last hour then you have to have some sort of timestamp in a database column. ie its a design issue

  • How to return mismatched rows from two tables?

    I have created two tables in the same database as below which gives the row
    count of tables across all databases before and after an DB restore
    operation.
    create table before_restore(db_name varchar(100),table_name
    varchar(1000),row_count int) insert into before_restore exec sp_msforeachdb 'USE
    [?]; select ''?'' as database_name,o.name,max(i.rowcnt ) From [?].sys.objects o
    inner join [?].sys.sysindexes i on o.object_id=i.id where o.type=''U'' group by
    o.name'
    create table after_restore(db_name varchar(100),table_name
    varchar(1000),row_count int) insert into after_restore exec sp_msforeachdb 'USE
    [?]; select ''?'' as database_name,o.name,max(i.rowcnt ) From [?].sys.objects o
    inner join [?].sys.sysindexes i on o.object_id=i.id where o.type=''U'' group by
    o.name'
    I want to compare these two tables and it should only return me rows that
    have changed after the restore operation is complete.
    Eg:
    Table xyz has rowcount of 100 before restore and the restore was not proper
    and after restore count is 50. So it should return me the result set as
    below;
    Db_name    Table_Name  row_count_before_restore    row_count_after_restore
    abc                   xyz                       100                              
       50
    Thanks!!!

    Something like below perhaps? Btw, I recommend using catalog view and dynamic management views instead of the old system tables (now called compatibility views)...
    SELECT
    COALESCE(a.db_name, b.db_name) AS db_name
    ,COALESCE(a.table_name, b.table_name) AS table_name
    ,a.row_count AS row_count_before_restore
    ,b.row_count AS row_count_after_restore
    FROM before_restore AS b FULL OUTER JOIN after_restore AS a ON b.db_name = a.db_name AND b.table_name = a.table_name
    WHERE b.row_count <> a.row_count OR b.db_name IS NULL OR a.db_name IS NULL
    Tibor Karaszi, SQL Server MVP |
    web | blog

  • How to increase the row after matching one opration??

    hello,
    i am looking  for the logic to go to the next row if data are matched.
    for example when i run vi it will take first row and in first row  data of the column 3 and 4 are compared with the data which is enterd by user.
    if data matched then next row will come and same operation will going on.
    here in attachment i have attached vi in which i tried to compare the coulum 3 and 4 with the manualy enter data.
    could any one please suggest that how can i do so??
    thank you very much in advance.
    Attachments:
    Untitled 3.vi ‏9 KB
    1 - Copy.log ‏1 KB

    What do you do if they don't match?
    Do you really just want to keep reading the file?  Are you waiting for the file to change?
    How do you know when you are done looking for matches?
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • How to get multiple row values in one text box while clicking one row from grid?

    hi friends,
               i am working on flex4 web application i am using  one datagrid ,it have two records(bills),one button and one text box.
    ex:
    customername      salesrepname   receipt no      amount
    venkat                         raj                         1102          10000
    ramu                          ramesh                   1102         20000
    here both receipt no is same.now i want to select one of this receipt and click pay button which is place in outside the grid.
    now my need is after click the pay button in text box i need 10000+20000=30000,after click that button i want both receipts should be invisible...'
    how i will do this,
    any suggession,
    Thanks
    B.venkatesan

    One way with 10g:
    select mgr,
           rtrim(xmlagg(xmlelement(empno,empno||',').extract('//text()')),',')  emps
    from emp
    where mgr is not null
    group by mgr;10g:
    -- define this function:
    create or replace
    function concatenate(c Sys_refcursor, sep varchar2 default null) return varchar2
    as
      val varchar2(100);
      return_value varchar2(4000);
    begin
    --  open c;
      loop
      fetch c into val;
      exit when c%notfound;
      if return_value is null then
        return_value:=val;
      else
        return_value:=return_value||sep||val;
      end if;
      end loop;
      return return_value;
    end;
    select mgr,
           concatenate(cursor(select empno from emp e where e.mgr=emp.mgr order by empno),',')
    from emp
    where mgr is not null
    group by mgr;With 11g:
    select mgr,
           listagg(empno,',') within group (order by empno) emps
    from emp
    where mgr is not null
    group by mgr;

  • How not show duplicate rows based on one field

    Oracle Database 11g Enterprise Edition Release 11.2.0.3.0
    Hello
    I have a query that looks for certain scripts that did not run on a particular day compared to what ran the same day a week ago. We want to include the start_datetime and end_datetime but when I add it to the select statement it brings up all instances of the jobs that run multiple times during the day. Is there a way to exclude the extra rows based on the script_name field?
    SELECT instances.script_name,
                             instances.instance_name,
                             REGEXP_REPLACE(master.description,
                                            chr(49814),  -- em-dash
                                            '-') description
                                            --instances.start_datetime
                      FROM   xxcar.xxcar_abat_instances Instances,
                             xxcar.xxcar_abatch_master  Master
                      WHERE  1 = 1
                      AND    TRUNC(start_datetime) = TRUNC(TO_DATE(:p_StartDate, 'YYYY/MM/DD HH24:MI:SS')) - (:p_NumOfWeeks * 7)
                      AND    Instances.SCRIPT_NAME = Master.SCRIPT_NAME (+)
                      MINUS
                      SELECT script_name,
                             instance_name,
                             NULL
                             --NULL
                      FROM   xxcar.xxcar_abat_instances
                      WHERE  1 = 1
                      AND    TRUNC(start_datetime) = TRUNC(TO_DATE(:p_StartDate, 'YYYY/MM/DD HH24:MI:SS'))

    MINUS does a set operation - removing rows from the first set that exactly match the second set.
    When you add columns to the first set, you want a more restricted filtering - try a multi-column NOT IN:
    To remove multiple runs, group and get min/max
    SELECT instances.script_name,
                             instances.instance_name,
                             REGEXP_REPLACE(master.description,
                                            chr(49814),  -- em-dash
                                            '-') description,
                             min(instances.start_datetime) start_datetime,
                             min(instances.end_datetime) end_datetime
                      FROM   xxcar.xxcar_abat_instances Instances,
                             xxcar.xxcar_abatch_master  Master
                      WHERE  1 = 1
                      AND    TRUNC(start_datetime) = TRUNC(TO_DATE(:p_StartDate, 'YYYY/MM/DD HH24:MI:SS')) - (:p_NumOfWeeks * 7)
                      AND    Instances.SCRIPT_NAME = Master.SCRIPT_NAME (+)
                      AND (script_name, instance_name) NOT IN
                    ( SELECT script_name,
                             instance_name
                      FROM   xxcar.xxcar_abat_instances
                      WHERE  1 = 1
                      AND    TRUNC(start_datetime) = TRUNC(TO_DATE(:p_StartDate, 'YYYY/MM/DD HH24:MI:SS'))
    group by instances.script_name, instances.instance_name, master.descriptionYou didn't give table definitions, and the query has schemas in it, so I didn't test it.
    regards,
    David

  • How to return multiple rows in case when condition?

    I want to display the list of product names owned by a company.If no products found it should return a string like "NO PRODUCTS FOUND'
    The query I wrote working well but when the condition does not satisfy Its not returning  "NO PRODUCTS FOUND''. Can someone help me how can I do this?
    declare @Country varchar(100)='Netherlands'
    SELECT     CASE WHEN count(table4.ProductName) >0 THEN table4.ProductName 
                   ELSE 'NO PRODUCTS FOUND' END AS Product_list
    FROM              table2 INNER JOIN
                          table1 ON table2.AccountID = table1.AccountID INNER JOIN
                          table3 ON table1.[company_ID] = table3.[company_ID] INNER JOIN
                          table4 ON table4.ProductID = table2.ProductID
    WHERE    
                         table1.[country] IN (@Country)) AND table4.ProductID IN (24410, 24413, 24418, 24383,                           24384))
    GROUP BY table4.ProductName 

    Your DDL does not match your query.
    You also supplied no test data.
    You're using INNER JOINS to enforce relationships that may not exist. You're using a WHERE clause to do the same.
    Try this:
    DECLARE @table1 TABLE (accountid int not null, productID varchar(20), company_id int)
    DECLARE @table2 TABLE (accountid int not null, country varchar(20))
    DECLARE @table3 TABLE (company_id int not null, company_name varchar(20))
    DECLARE @table4 TABLE (productID int not null, productname varchar(20))
    INSERT INTO @table2 (accountid, country) VALUES (1, 'Netherlands'),(2, 'Netherlands'),(3, 'Germany')
    INSERT INTO @table1 (accountid, productID, company_id) VALUES (1,24410,1)
    INSERT INTO @table3 (company_id, company_name) VALUES (1,'one company'),(2,'two company'),(3,'three company')
    INSERT INTO @table4 (productID, productname) VALUES (24410,'a product')
    DECLARE @Country varchar(100)='Netherlands'
    SELECT t3.company_name,
    CASE WHEN count(t4.ProductName) > 0 THEN t4.ProductName
    ELSE 'NO PRODUCTS FOUND'
    END AS Product_list
    FROM @table2 t2
    INNER JOIN @table3 t3
    ON t2.accountid = t3.company_id
    LEFT OUTER JOIN @table1 t1
    ON t2.accountid = t1.accountid
    LEFT OUTER JOIN @table4 t4
    ON t1.productID = t4.productID
    WHERE t2.country = @Country
    GROUP BY t3.company_name, t4.productName

  • How to return only rows belonging to an authenticated user?

    Hi, i have a basic JHeadstart application with a form which is currently returning all the rows of a tasks table containing tasks belonging to users, and allows update and insert of new rows to this table.
    I wish to extend this application to include a basic login screen to authenticate the users initially, and then somehow pass the username onto the Jhs form and have it return only the rows from the tasks table which have a userid matching the login username.
    So basically i want to hide the userid column from displaying on screen, and code the form so that the userid column must always match the login username during any view/update/insert/delete operation the form initiates.
    Currently the users are all separate database users and are not known/controlled by the Jdeveloper app yet, so a database connection based authentication method would be most relevent I believe, however I haven't seen any mention in the DB authentication based blogs regarding using the login information in the application such as restricting the results of a table form in the way described above.
    Any pointers appreciated,
    Thanks

    Hi,
    it's used in conjuction with JAAS / Container managed security. The user requests a page which is within a protected resource and is then prompted to login. Once logged in the user principal is available (can be referenced) in both the user interface and model layers.
    The VPD option is there to reduce the coding required in the ADF model layer.
    This article explains how to get JAAS to use a custom database LoginModule which sits undeneath JAAS.
    http://www.oracle.com/technology/products/jdev/howtos/1013/oc4jjaas/oc4j_jaas_login_module.htm
    This you how to reference the currently logged in user in the various layers within the application:
    http://brendenanstey.blogspot.com/2007/05/j2ee-container-managed-security-how-to.html
    The security setup is also covered in the ADF Developer guide which is here:
    http://download.oracle.com/docs/pdf/B25947_01.pdf
    Brenden

  • How to return "Final Row Count" - where I have suppression filters etc

    I am building a data interface that outputs "trade records"
    Each report/file has a primary header record
    each report/file has a secondary header record for EACH TRADE
    each report/file has trade details per account under the secondary header record for EACH TRADE
    each report/file has a primary footer record, that shows the total row count of the resultant details
    the "Records" count in crystal is not what I need, as when the report prints/Exports, certain of those records are suppressed.
    I only need what "lands" in my txt file in respect to that final number of total rows of data
    Any suggestions are very greatly appreciated.  My search thru the forum did not return an answer that I could see.
    thank  you!
    Chris
    Edited by: CHRISTOPHER MAINARD on Jul 27, 2010 5:14 PM

    Thank  you  - I very much appreciate your response - but about the same time you posted - my experimentation and borrowing of like situation formulae seemed to solve it with some tweaking! 
    first I added this formula to count each "trade record"
    Whileprintingrecords;
    numbervar linecnt := linecnt +1
    then, in the "file footer" added this:
    tonumber({@totalRowCount})DistinctCount ({MoxyAllocation.OrderID})1
    thank you again for your input, I'm betting I'll find a use for that in the near future.
    CBM

  • How I can display the values in one row when they come from the same colum

    This query
    SELECT
    sorints_ints_code
    FROM
    saturn.sorints a,
    connman.cc_adm_prospect_master
    WHERE
    sorints_ints_code like 'Z%'
    and sorints_pidm = prospect_pidm
    give me the results of
    ZA
    ZB
    ZC
    I want to use this query in a cursor to update a column in another table, the problem is that I need to update the table concatenating the values ZA,ZB,ZC
    I have 24 different codes stored in the column sorints_ints_code, so I don’t want to use 24 different cursors and I don’t to use cross reference, It is there any way that I DON’T know to display the data like this za,zb,zc without using cross reference, I don’t want to use the table 24 times…
    Like THIS, this is only for two values…
    SELECT
    a.sorints_ints_code,
    b. sorints_ints_code
    FROM
    saturn.sorints a,
    saturn.sorints b
    connman.cc_adm_prospect_master
    WHERE
    a.sorints_ints_code = ‘ZA’
    AND a.sorints_ints_code = ‘ZB’
    and a.sorints_pidm = prospect_pidm
    and b.sorints_pidm = prospect_pidm
    REMEMBER, I have 24 different values
    I am trying to write a procedure like this;
    Someone suggest this v_int_code1 := v_int_code1||interest_coach_rec.sorints_ints_code;
    BUT IT IS NOT WORKING!!!
    PROCEDURE prospect_coach_interest_upd
    p_prospect_term_code IN srbrecr.srbrecr_term_code%TYPE,
    p_prospect_admin_err_code OUT VARCHAR2,
    p_ora_err_code OUT NUMBER,
    p_ora_err_msg OUT VARCHAR2
    ) IS
    v_out_path VARCHAR2(40) := '/home/connman/student';
    v_out_file VARCHAR2(40) := 'cc_adm_prospect_'||p_prospect_term_code||'_'||TO_CHAR(SYSDATE,'YYYYMMDDHH');
    v_file_handle UTL_FILE.FILE_TYPE;
    v_pidm NUMBER;
    v_int_code1 varchar2(30);
    v_int_code2 varchar2(2);
    v_int_code3 varchar2(2);
    CURSOR cur_pidms IS
    SELECT prospect_pidm
    FROM connman.cc_adm_prospect_master
    WHERE prospect_term_code = p_prospect_term_code
    FOR UPDATE;
    CURSOR interest_coach_cur is
    SELECT
    sorints_ints_code
    FROM
    saturn.sorints
    WHERE
    sorints_ints_code like 'Z%'
    and sorints_pidm = v_pidm ;
    interest_coach_rec interest_coach_cur%ROWTYPE;
    BEGIN
    UTL_FILE.FCLOSE_ALL;
    v_file_handle := UTL_FILE.FOPEN (v_out_path, v_out_file, 'a');
    UTL_FILE.PUT_LINE (v_file_handle,
    CHR (10) || TO_CHAR (SYSDATE, 'DD-MON-YYYY HH:MI:SS')
    UTL_FILE.PUT_LINE (v_file_handle, 'Entering the Admin Name procedure.');
    --- BEGIN
    FOR rec_pidms IN cur_pidms
    LOOP
    EXIT WHEN cur_pidms%NOTFOUND;
    v_pidm := rec_pidms.PROSPECT_pidm;
    v_int_code1 := v_int_code1||interest_coach_rec.sorints_ints_code;
    IF interest_coach_cur%ISOPEN
    THEN
    CLOSE interest_coach_cur;
    END IF;
    OPEN interest_coach_cur;
    FETCH interest_coach_cur
    INTO interest_coach_rec;
    IF interest_coach_cur%FOUND
    THEN
    UPDATE
    connman.cc_adm_prospect_master
    SET
    PROSPECT_COACH_INTEREST = interest_coach_rec.sorints_ints_code
    WHERE CURRENT OF cur_pidms;
    END IF;
    END LOOP;
    COMMIT;
    p_prospect_admin_err_code := '0';
    UTL_FILE.put_line (v_file_handle, 'Successful Completion.');
    EXCEPTION
    WHEN OTHERS
    THEN
    p_prospect_admin_err_code := '1';
    p_ora_err_msg := SUBSTR (SQLERRM, 1, 2000);
    p_ora_err_code := SQLCODE;
    END; -- prospect_coach_interest_upd;

    Search in the forum or web you will find many solutions
    Return multi-row result as one comma-delimited row
    http://www.oracle-developer.net/display.php?id=412

  • 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.

  • 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.

  • Returning a row of data in a stored procedure

    Please help me remember how to return a row or rows from a pl/sql query in a stored procedure.
    I am having a major brain fart.

    If want to return a resultset from stored procedures see here for an example
    http://asktom.oracle.com/~tkyte/ResultSets/index.html

  • I just returned from Europe and my ipad will not connect to my home WiFi. It keeps giving me the message ""unable to join the network "Pepper".  This is my known home network.

    I just returned from Europe and my ipad will not join my home WiFi network.  It keeps giving me the message "Unable to join the network"  Any ideas?
    I turned off my airplane mode.

    "That was Easy!"  Thanks!

Maybe you are looking for