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

    Creating and calling stored procedure


    I am very new to Oracle and have a simple question, which I can't easy find
    an answer to in the documentation.

    I want to write a simple stored procedure in PL/SQL with one input
    parameter, and which returns 1 result set.
    That should be very simple, but I can't find any examples for this simple
    task in the documentation. Maybe
    I haven't looked in the right places :-) Is there anyone who could help me
    with an example?

    And I also want to call this procedure from SQL*Plus, like this: call (or
    execute) schema.proc (param=1) and get something like this in return:

    Id    Name     Address
    1    AA          Street 1, 12345 Town
    2    BB           Street 5, 12345 Town
    .....

    Is that possible? And what is the syntax? And what if there are out
    parameters, how do I specify them in the call (execute)
    statement?

    Regards
    Odd B Andersen

    "Odd Bjrn Andersen" <oba@online.no> a crit dans le message de news: 462f446f$0$90269$14726@news.sunsite.dk...
    |I am very new to Oracle and have a simple question, which I can't easy find
    | an answer to in the documentation.
    |
    | I want to write a simple stored procedure in PL/SQL with one input
    | parameter, and which returns 1 result set.
    | That should be very simple, but I can't find any examples for this simple
    | task in the documentation. Maybe
    | I haven't looked in the right places :-) Is there anyone who could help me
    | with an example?
    |
    | And I also want to call this procedure from SQL*Plus, like this: call (or
    | execute) schema.proc (param=1) and get something like this in return:
    |
    | Id    Name     Address
    | 1    AA          Street 1, 12345 Town
    | 2    BB           Street 5, 12345 Town
    | .....
    |
    | Is that possible? And what is the syntax? And what if there are out
    | parameters, how do I specify them in the call (execute)
    | statement?
    |
    | Regards
    | Odd B Andersen
    |
    |

    http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14357/ch5...

    Regards
    Michel Cadot

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

    http://www.psoug.org
    Click on Morgan's Library
    Click on REF CURSOR
    --
    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 2007-04-25, Odd Bjrn Andersen <oba@online.no> wrote:

    something like (untested):

    create procedure p(param in varchar2) as
    begin

      for r in (select col_1, col_2 from tab where col_3 = param) loop

        dbms_output.put_line(r.col_1 || ' ' || r.col_2);

      end loop;

    end p;
    /

    See also
      http://www.adp-gmbh.ch/blog/2006/01/08.html
      http://www.adp-gmbh.ch/blog/2006/03/24.php
      http://www.adp-gmbh.ch/blog/2007/04/22.php

    --
      Rene Nyffenegger
      http://www.adp-gmbh.ch

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

    "Rene Nyffenegger" <rene.nyffeneg@gmx.ch> wrote in message

    news:f0oi10$tko$1@klatschtante.init7.net...

    Thanks to all of you! I will look at the suggestion, and the links.
    Hopefully they will help me solve this.

    Regards
    Odd B Andersen

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