Home     |     Java    |     Php General    |     Oracle Database    |     Oracle Server  

MS Dynamics CRM 3.0

  •  Setting up and Configuring Microsoft Dynamics CRM 3.0
  •  Managing Security and Information Access
  •  Entity Customization: Concepts and Attributes
  •  Entity Customization: Forms and Views
  •  Entity Customization: Relationships, Custom Entities, and Site Map
  •  Reporting and Analysis
  •  Workflow
  •  Server-Side SDK
  •  Client-Side SDK
  •  Integration with External Applications
  • Cervo Technologies
    The Right Source to Outsource

    Sharepoint Portal Server KB

    Microsoft CRM Info

    WPF Interview Questions

    SilverLight Interview Qs

    Asp.Net 2.0 Interview Qs

    Asp.NET 1.1 FAQs

    Oracle Interview Questions

    SAP Interview Questions

    Oracle Database

    Simple Cursor


    Ive been looking online and cant seem to find a good example of a
    cursor I need to create..I want to assign variables in a cursor then
    select them in a recordset....its simple to do in sql server..but i
    cant seem to find a way in oracle....I dont have permission to create
    temp tables and Im not looking to do db outputs...if someone could
    provide an example that would be great...

    Thanks

    -Jim

    Jimbo schreef:
    > Ive been looking online and cant seem to find a good example of a
    > cursor I need to create..I want to assign variables in a cursor then
    > select them in a recordset....its simple to do in sql server..but i
    > cant seem to find a way in oracle....I dont have permission to create
    > temp tables and Im not looking to do db outputs...if someone could
    > provide an example that would be great...

    > Thanks

    > -Jim

    AAARRRRGGHHH!!!

    Temp tables, TEMP tables, TEMPTABLES?!?!

    A cursor returns a pointer into your recordset, so I fail to
    see how you can "assign variables in a cursor" and "then
    select them".

    what do you want to do - and why use a cursor? Never
    use pl/sql when you can do it in SQL.

    Why would you:
    declare
      cursor c_sel_emp IS select * from emp;
      l_out varchar2(240);
    begin
    for r_emp in c_sel_emp
    loop
      l_out := r_emp.ename;
      dbms_output.put_line(l_out);
    end loop;
    end;

    when you can:
    select ename from emp;

    --
    Regards,
    Frank van Bortel

    Top-posting is one way to shut me up...

    -----------------------------------------------Reply-----------------------------------------------

    ok heres what Im trying to do....Im trying to flatten a record
    set...so say case number 07 has orders 1 and 3 associated with
    it....if you do a select youll get.

    case number      order number
    -----------------       --------------------
    07                     1
    07                     3

    I want to use a cursor so I can concatenate the order number field and
    return

    case number     order numbers        order count
    ------------------     ---------------------        -----------------
    07                    1, 3                         2

    I can only think to do this with a cursor....if you know another way
    Im all ears

    -Jim

    -----------------------------------------------Reply-----------------------------------------------

    Have you heard of cross-tabulation? Pivot tables? Use DECODE.

    Example at www.psoug.org
    Click on Morgan's Library
    Click on DECODE.
    --
    Daniel A. Morgan
    University of Washington
    damor@x.washington.edu
    (replace x with u to respond)
    Puget Sound Oracle Users Group
    www.psoug.org

    -----------------------------------------------Reply-----------------------------------------------

    On 27 apr, 00:22, Jimbo <jamesfer@hotmail.com> wrote:

    Why would you want to flatten (denormalize) a record - what's the
    bigger picture
    behind this - probably you focus on a little piece where te big
    picture
    can give a completely different (and for Oracle, far more effective!)
    solution.

    -----------------------------------------------Reply-----------------------------------------------
    I found an example of how to do what I was talking about...yes I want
    to do a pivot table...and yes a cursor is needed....heres the link...

    http://weblogs.asp.net/stevencohn/archive/2005/01/28/362373.aspx

    Thanks for all your help...

    -Jim

    Add to del.icio.us | Digg this | Stumble it | Powered by Megasolutions Inc