How to make changes in stored procedure?

Few years back i developed an application using oracle 7. now i have to execute the same application but with some modifications using oracle 8i web db.
Now the problem is that if i have to make any change in the stored procedures, first i've to drop them then i do the modifications and then run (execute )it. Is there any way to modify the stored procedure without dropping it again and again.
Your ideas/experiences/suggestions are welcome. You can reply me at [email protected]
Seema

hi Sima,
instead of using:
"Create Procedure"
in 8i you can do:
"Create or Replace Procedure"
the same goes to package and function.
have fun,
Evan

Similar Messages

  • How to output value from stored procedure

    Hi folks, I need to output the OrderFK from a stored procedure not really sure how to achieve this any help or tips much appreciated.
    Sql code below
    USE [TyreSanner]
    GO
    /****** Object: StoredProcedure [dbo].[AddCustomerDetails] Script Date: 11/12/2014 20:56:34 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    ALTER PROCEDURE [dbo].[AddCustomerDetails]
    /***********************Declare variables ***********************/
    /******tblCustomer******/
    @Forename nvarchar(50),
    @Surname nvarchar(50),
    @HouseNo nvarchar(50),
    @CustAddress nvarchar(50),
    @Town nvarchar(50),
    @Postcode nvarchar(50),
    @ContactNo nvarchar(50),
    @EmailAddress nvarchar(50),
    /******tblLink_OrderProduct******/
    @ProductQuantity int,
    @TotalProductSaleCost decimal,
    @ProductFK int,
    @FittingDate date,
    @FittingTime Time
    As
    DECLARE @CustomerFK int;
    DECLARE @OrderFK int;
    Begin TRANSACTION
    SET NOCOUNT ON
    INSERT INTO [TyreSanner].[dbo].[Customer](Forename, Surname, HouseNo, CustAddress, Town, Postcode, ContactNo, EmailAddress)
    VALUES (@Forename,@Surname,@HouseNo,@CustAddress,@Town,@Postcode,@ContactNo,@EmailAddress)
    Set @CustomerFK = SCOPE_IDENTITY()
    INSERT INTO [TyreSanner].[dbo].[Order] (CustomerFK)
    VALUES (@CustomerFK)
    SET @OrderFK = SCOPE_IDENTITY()
    INSERT INTO [TyreSanner].[dbo].[Link_OrderProduct](OrderFK, ProductFK, ProductQuantity, TotalProductSaleCost, FittingDate, FittingTime)
    VALUES
    (@OrderFK, @ProductFK, @ProductQuantity, @TotalProductSaleCost, @FittingDate, @FittingTime)
    COMMIT TRANSACTION

    Hi brucey54,
    There’re several ways to capture the value from a Stored Procedure. In you scenario, I would suggest 2 options, by an output parameter or by a table variable.
    By an output Parameter, you need to make a little bit modification on your code as below:
    USE [TyreSanner]
    GO
    ALTER PROCEDURE [dbo].[AddCustomerDetails]
    @Forename nvarchar(50),
    @FittingDate date,
    @FittingTime Time,
    @OrderFK int output
    As
    DECLARE @CustomerFK int;
    --DECLARE @OrderFK int;
    Run the following code, Then @OrderFKvalue holds the value you’d like.
    DECLARE @OrderFKvalue int;
    EXEC AddCustomerDetails(your parameters,@OrderFKvalue output)
    Anyway if you don’t like to add one more parameter, you can get the value by a table variable as well. Please append “SELECT @OrderFK;” to your Procedure as below:
    USE [TyreSanner]
    GO
    ALTER PROCEDURE [dbo].[AddCustomerDetails]
    SET @OrderFK = SCOPE_IDENTITY()
    INSERT INTO [TyreSanner].[dbo].[Link_OrderProduct](OrderFK, ProductFK, ProductQuantity, TotalProductSaleCost, FittingDate, FittingTime)
    VALUES
    (@OrderFK, @ProductFK, @ProductQuantity, @TotalProductSaleCost, @FittingDate, @FittingTime);
    SELECT @OrderFK;
    Then you can call the Stored Procedure as below:
    DECLARE @T TABLE (OrderFK INT);
    INSERT @T EXEC AddCustomerDetails(your parameters) ;
    SELECT OrderFK FROM @T;
    There’re more options to achieve your requirement, please see the below link:
    How to Share Data between Stored Procedures
    If you have any question, feel free to let me know.
    Best Regards,
    Eric Zhang

  • How to select from a stored procedure?

    Lets say I have a simple stored procedures
    Create Procedure stp_test
    As
    Begin
     Select * from tbl1
    End
    Go
    I would like to be able to do this in SSMS (actually, I want to do this from ADODB)
    Select top 10 * from ...stp_test... Order By rowID
    It looks like I want to use OpenQuery on the stored Procedure, but I have not been able to do it correctly.  How can I query my stored procedure?
    Rich P

    It looks like I want to use OpenQuery on the stored Procedure, but I have not been able to do it correctly.  How can I query my stored procedure?
    If you want to use the OPENQUERY method , use the following.. follow this link...
    http://stackoverflow.com/questions/209383/select-columns-from-result-set-of-stored-procedure
    Please mark as answer, if this has helped you solve the issue.
    Good Luck :) visit www.sqlsaga.com for more t-sql code snippets and BI related how to articles.

  • How to make changes in another program?

    Hi evrybody,
    how  to make changes from one program  to another program ?
    Changes should be reflecting in other program.
    thanx in advance n wud be surely Rewarded if answer is helpful.

    Hi Bharat,
    Thanx for the info.
    But what my requirement is , I'm scanning & reading another report into an Internal table. I want to change the Hyphen's
    '-' used in variable declarations of another program into Underscore '_' .
    My sample code is like this..
    Report Zmain.
    PARAMETERS:
      p_prog LIKE sy-repid,
      p_key LIKE stokex-str.
    Internal Table t_itab                                                *
    DATA:
      BEGIN OF t_itab OCCURS 0,
        line(256) TYPE c,
      END OF t_itab.
    *" Data declarations...................................................
    DATA:
      t_statements LIKE sstmnt OCCURS 0 WITH HEADER LINE,
      t_levels LIKE slevel     OCCURS 0 WITH HEADER LINE,
      t_tokens TYPE stokesx    OCCURS 0 WITH HEADER LINE,
      t_keywords LIKE t_itab   OCCURS 0 WITH HEADER LINE,
      w_i TYPE i,
      w_j TYPE i.
                            START-OF-SELECTION                           *
    START-OF-SELECTION.
      APPEND p_key TO t_keywords.
      READ REPORT p_prog INTO t_itab.
      SCAN ABAP-SOURCE t_itab
      STATEMENTS INTO t_statements
      LEVELS INTO t_levels
      TOKENS INTO t_tokens
      KEYWORDS FROM t_keywords
      WITH INCLUDES
      WITH ANALYSIS
      WITH COMMENTS.
                            END-OF-SELECTION                             *
    END-OF-SELECTION.
      LOOP AT t_statements.
        READ TABLE t_levels INDEX t_statements-level.
        w_i = t_statements-from.
        w_j = t_statements-to.
       IF t_statements-level > 0.
        WHILE w_i < w_j.
          READ TABLE t_tokens INDEX w_i.
          REPLACE '-' WITH '_' INTO t_tokens-str.
          w_i = w_i + 1.
        ENDWHILE.
       ENDIF.
      ENDLOOP.
    My called program is like this....
    Report Zcalled.
    DATA:
      w-var1 TYPE c,
      w-var2 TYPE c.
    DATA:
      fs_flight1 TYPE sflight,
      t_flight1 LIKE STANDARD TABLE OF sflight.
    START-OF-SELECTION.
      INCLUDE zinclude3.
      SELECT * FROM sflight
        INTO TABLE t_flight1
        WHERE carrid = 'AA'.
      SELECT * FROM sflight
       INTO TABLE t_flight1
       WHERE carrid = 'LH'.
    END-OF-SELECTION.
      LOOP AT t_flight1 INTO fs_flight1.
        WRITE: / fs_flight1-carrid,
                 fs_flight1-connid,
                 fs_flight1-fldate,
                 fs_flight1-price.
      ENDLOOP.
    Thanx very much.

  • How to call pl/sql stored procedure in JDBC query dialogbox

    Hi,
    how to call pl/sql stored procedure in JDBC query dialogbox(reports 9i) .
    Cheers,
    Raghu

    please refer : Re: problem If you have more doubts, please ask in that question.

  • How to check performance for Stored procedure or Package.

    Hi ,
    Can any one please tell me , how to check performance for Stored procedure or Function or Package
    Thanks&Regards,
    Sanjeev.

    user13483989 wrote:
    Hi ,
    Can any one please tell me , how to check performance for Stored procedure or Function or Package
    Thanks&Regards,
    Sanjeev.Oracle has provided set of Tools to monitor the Performance.
    Profilers being one of them; If you wish to understand more on PL/SQL Optimization, please read PL/SQL Optimization and Tuning.
    See example of DBMS_PROFILER.
    See example of PLSQL Hierarchial Profiler

  • How to call PL-SQL/stored procedure in Creator

    Anybody can tell how to call PL-SQL/Stored procedures inside creator...

    Hi!!!
    You can see this topic http://forum.sun.com/jive/thread.jspa?threadID=106046
    There is how to call oracle stored procedures. Also I put a lot of links in these topic doing reference stored procedures. I have one that it tells specially how to call oracle stored procedures from java, is in spanish but you can understand the code.;-)
    http://yoprogramador.vampisol.com/index.php?title=pl_sql_oracle_desde_java&more=1&c=1&tb=1&pb=1
    Byeee

  • How to execute the parametered stored procedure in sql *plus ?

    how to execute the parametered stored procedure in sql *plus ?
    my storedprocedure format
    CREATE OR REPLACE PROCEDURE SMS_SELECTMPLOYEE
    (empDOB out date, empEmpName out varchar2)
    thanks & regards
    mk_mur

    Oh, sorry... making many reading-too-fast mistakes today...
    You can't declare date variables in SQL*Plus (seel help var), but you can cast to varchar2:
    TEST> CREATE OR REPLACE PROCEDURE SMS_SELECTMPLOYEE (empDOB out date, empEmpName out varchar2) IS
      2  d date := sysdate;
      3  e varchar2(10) := 'bob';
      4  begin
      5  empdob := d;
      6  empempname := e;
      7  end;
      8  /
    Procedure created.
    TEST> var d varchar2(30)
    TEST> var n varchar2(30)
    TEST> call  SMS_SELECTMPLOYEE(:d,:n);
    Call completed.
    TEST> print d n
    D
    11/07/06
    N
    bobYoann.

  • How to list dependencies of stored procedure in a package in oracle

    hi gurus,
    can any body help me to solve the below issue?
    how to list dependencies of stored procedure in a package in oracle?
    advanced thanks...

    It sounds like you're going to have trouble because you're trying to track dependencies at a more fine-grained level than Oracle does (at least prior to 11g, which I know does finer-grained dependency tracking for columns, so there may be something that would help you there).
    In Oracle, the entity is the package body. The procedure within the package does not have dependencies and does not depend on anything, it is part of the package body, which does have dependencies. You can see what tables are used by the package body via DBA_DEPENDENCIES. But if you're trying to track the dependencies for a particular procedure in a package, you'd either have to manually examine the code or you'd have to write your own PL/SQL parser.
    Justin

  • Can any body tell me how to make changes in the print layout of Fb03.

    hi,
    Can any body tell me how to make changes in the print layout of Fb03.
    I want to add comapny address on the layout.
    Regards
    Mave

    If you mean the correspondence, you have to change the configuration in Financial Accounting -> AR and AP -> Business Transactions -> Outgoing Invoices -> Carry Out abd Check Settings for Correspondence. There, you need to assign your custom Program or Layout for the Correspondence Type (like SAP19) and Program.
    If you mean the display layout in transaction FB03, You can change a few settings, mainly with BKPF and BSEG fields. I don't think you can add company address, though.
    Good luck,
    Bhanu

  • How to make changes in default toolbar

    hi
    i m using oracle forms 6 and i want to know either it is possible to change in the default toolbar or not if so plz let me know how to make changes in default toolbar and re-adjust according to my need.i know how to create new toolbar and connect with form but i don't know whether this is possible to re-arrenge and change the default toolbar attached with forms.
    thnx in advance

    thnks for ur reply. i worte that i m using forms 6i so that ur reply do not fullfill my query.
    i posted my query because i have seen an application developed in oracle form 6 and he designed exactly the same iconic toolbar as we see normal while running the forms and i tried but could not able designed accordingly as button don't have "bevel" property and button we use .ico extension if we want to use icon buttons.now i m astonised if there is not any way make changes then how he did.

  • How to make changes in standard transaction ME51N.

    Hi,
       Can anyone tell me how to make changes in standard transaction ME51N.
       I want to call transaction AS01 by clicking on standard button create asset. Please do the needful.
    Regards.
    Aniruddha

    Hi anirudda
              As i understood from your question is that you want to add a new field 'CREATE ASSET' on me51n screen.
    If i am correct you can use 'MEREQ001' enhancement for this purpose and you can write you code in the exits available in this enhancement.
    Please check the documentation of this enhancement for more info.
    (Use Smod for this purpose)
    I hope it is helpful.
    Reward points
    Thanks,
    Prasanna

  • How to make changes in strong password policy

    hi,
    how to make changes in strong password policy.
    I m using apex 4.2.
    pls help

    1003090 wrote:
    I created a login page, but when i m putting a password or more then 7 character then in place of Invalid Login Credentials , its saying
    ORA-06502: PL/SQL: numeric or value error: character string buffer too small.
    I need to put a password of min 8 character, since its taking not more then 7 so i cannot use validation for the same.You already have a thread open on that: +{thread:id=2532900}+. Continue with that issue there.
    If the original question above relating to how to configure password policies is answered then close this thread.

  • How to make changes in deduction column in IT 2006

    Hi All,
    Scenario: Employee had a sick leave & casual leave quota 6 days in a financial year.
    Now the employee had used all his sick leaves and casual leaves and the leaves got exhausted pertaining to this quota.
    These days are reflecting in 2001 IT as leaves taken  but the deduction did'nt happen in IT 2006
    Can anyone tell how to make changes in the deduction column for specific employee code's
    Regards,
    Srikanth

    Hi Megha,
    The assignment is properly mapped to counting rule.. Issue is with the validity intervals. SInce the employee already availed the leaves the quotas cannot be deleted in the IT 2006. Issue resolved by making some changes in the deduction column through SQL table entry..
    Really appreciate your response..
    Regards,
    Srikanth

  • How to convert SQL server stored procedures to Oracle 11g

    Hi Experts,
    In SQL server 30 stored procedures are there how to convert all the stored procedure
    from SQL server to Oracle 11g.
    Please help me,
    Thanks.

    ramya_162 wrote:
    In SQL server 30 stored procedures are there how to convert all the stored procedure
    from SQL server to Oracle 11g.
    The single most fundamental concept you need to understand (grok in its fullness) is:
    ORACLE IS NOT SQL-SERVER
    There is very little, to NOTHING, in common between T-SQL (a language extension to SQL) and PL/SQL (integration of SQL with the language Ada, part of ALGOL family of languages that includes Pascal and C++).
    So taking a T-SQL procedure and porting it as is to PL/SQL is plain stupid.
    Why?
    Oracle sucks at trying to be SQL-Server.
    So how do you migrate from SQL-Server to Oracle?
    By taking the REQUIREMENTS that the T-SQL procedures address, and addressing these requirements using Oracle SQL and PL/SQL.

Maybe you are looking for

  • Can't drag clip

    I am cutting audio originally from a video in the new Garageband, and I can't move the clip once I split it from the entire track. The track is unlocked, but there is a lock on the clip itself, and I can't figure out why else it won't let me click an

  • Is there any way to restore my first generation iPod touch?

    I recently reset my first generation iPod touch. I completely wiped it. My friend told me that I couldn't restore it since iTunes is on version ten and the first gen iPod touches don't support anything past update 1.3. Does anyone know of where I can

  • I am loading a video into Photoshop CC but getting no audio track

    When I load an mov or mp4 file into my photoshop CC installation. I get no audio track showing up. When I add the video as a wmv file, an audio track shows up, but the video pixels go to transparent as soon as I click the Play button (and I can hear

  • Mini over 1 year old, click wheel playing up won't swicth off

    Hi guys, I have this ipod for over a year and never once have any problem. Yesterday i couldn't switch my ipod off,the click wheel won't respond. Everything else are fine,though few times couldn't go to playlist.I reset it few times still won't work.

  • Oracle upgradation error

    Dear All,       I have implemented latest oracle patch in our windows server . after finished implementation i have check to mmc service instance at that time i m not get it our database SID NODE IS NOT APPEARING . any one plz give me a some suggecti