Menu

Can I download a stored procedure or view

Help
2005-05-13
2013-04-29
  • Dennis McRitchie

    This is a great tool, and I'm finding it very useful, but there's a couple of things I'm not sure how to do.

    I see how I can use Procedure Edit to upload a stored procesure into an Edit window, and then click on Save To Database to save the changes. But if I already have a stored procedure in an *.sql file in my Eclipse project, is there a way for me to edit it in that window and then download it to the database from there? (The trouble with the Procedure Edit way is that I then have no record of the changes in my Eclipse project.)

    Similarly, is there way to download the contents of an *.sql file containing a view definition? (In this case, there isn't even the equivalent of a Procedure Edit window available for views. There is only View Source, and it does not support Save To Database. So I'm not sure how to proceeed in this case.)

    Thanks very much.

    Dennis

     
    • Dennis McRitchie

      An additional note: If I try to click on the running man or right-click on Execute SQL for my Eclipse stored procedure window, I get an "ORA-00900: invalid SQL statement" error, and the stored procedure is truncated just before the first semi-colon would have appeared. It's as though the SQLExplorer code stopped the download at the first semi-colon. So for example, running Execute SQL on:
      ------------------------------------------------
      CREATE OR REPLACE PROCEDURE C_Order_Reserve
      (
          PInstance_ID                    IN NUMBER
      )
      AS
          --    Logistics
          ResultStr                    VARCHAR2(2000);
          Message                        VARCHAR2(2000);
          Record_ID                    NUMBER;
          IsProcessing                CHAR(1);
          IsProcessed                    CHAR(1);
          v_Result                    NUMBER := 1;    --    Success
      <snip>
      END C_Order_Reserve;
      /
      -------------------------------------------------

      results in a download of:
      -------------------------------------------------
      PROCEDURE C_Order_Reserve
      (
          PInstance_ID                    IN NUMBER
      )
      AS
          --    Logistics
          ResultStr                    VARCHAR2(2000)
      --------------------------------------------------------

      The rest (including the first semi-colon) is lost. Any thoughts?

      Thanks,
                  Dennis

       

Log in to post a comment.