Converting SQL Server to Oracle

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jevon

    Converting SQL Server to Oracle

    I am trying to conert a SQL Server (2000) database to Oracle to see if
    it is a supportable back end for my product. I am running into a
    stone wall with Stored Procedures though. I was wondering if someone
    could explain a simple way to turn this T-SQL statement into a Oracle
    PL/SQL statement:

    CREATE PROCEDURE [CrossTab - Bench Sheet]
    @BSID Int
    AS
    SELECT BenchSheets.*
    FROM BenchSheets
    WHERE BS_ID=@BSID


    I can't seem to find an easy way to do it and documentation isn't very
    helpful. If using a Stored Procedure is the wrong way I am open to
    any alternative to running a "Select" statement with a parameter to
    filter down.

    I appreciate any input,
  • Alex Ivascu

    #2
    Re: Converting SQL Server to Oracle

    What's the purpose? To return the values? Then you might want to create a
    function that returns the table...

    here's the proc version....

    create procedure CrossTab_BenchS heet (vi_bsid number)
    as
    begin
    select *
    from BenchSheets
    where bsid = vi_bsid;
    end;
    /


    "Jevon" <jevonthurlow@h otmail.comwrote in message
    news:34e7f100.0 404071038.21193 2f5@posting.goo gle.com...
    I am trying to conert a SQL Server (2000) database to Oracle to see if
    it is a supportable back end for my product. I am running into a
    stone wall with Stored Procedures though. I was wondering if someone
    could explain a simple way to turn this T-SQL statement into a Oracle
    PL/SQL statement:
    >
    CREATE PROCEDURE [CrossTab - Bench Sheet]
    @BSID Int
    AS
    SELECT BenchSheets.*
    FROM BenchSheets
    WHERE BS_ID=@BSID
    >
    >
    I can't seem to find an easy way to do it and documentation isn't very
    helpful. If using a Stored Procedure is the wrong way I am open to
    any alternative to running a "Select" statement with a parameter to
    filter down.
    >
    I appreciate any input,

    Comment

    • Dave

      #3
      Re: Converting SQL Server to Oracle

      jevonthurlow@ho tmail.com (Jevon) wrote in message news:<34e7f100. 0404071038.2119 32f5@posting.go ogle.com>...
      I am trying to conert a SQL Server (2000) database to Oracle to see if
      it is a supportable back end for my product. I am running into a
      stone wall with Stored Procedures though. I was wondering if someone
      could explain a simple way to turn this T-SQL statement into a Oracle
      PL/SQL statement:
      >
      CREATE PROCEDURE [CrossTab - Bench Sheet]
      @BSID Int
      AS
      SELECT BenchSheets.*
      FROM BenchSheets
      WHERE BS_ID=@BSID
      >
      >
      I can't seem to find an easy way to do it and documentation isn't very
      helpful. If using a Stored Procedure is the wrong way I am open to
      any alternative to running a "Select" statement with a parameter to
      filter down.
      >
      I appreciate any input,
      I don't know T-SQL that well, but maybe I can help.

      What does [CrossTab - Bench Sheet] mean? It it returning results of
      the query as a crosstab or something? Does it return a cursor to the
      caller?

      Can you show us what the Benchsheet table looks like and an example of
      what the output is supposed to look like?

      Dave

      Comment

      • Dave

        #4
        Re: Converting SQL Server to Oracle

        davidr212000@ya hoo.com (Dave) wrote in message news:<5e092a4e. 0404071546.1f9b 9ffe@posting.go ogle.com>...
        jevonthurlow@ho tmail.com (Jevon) wrote in message news:<34e7f100. 0404071038.2119 32f5@posting.go ogle.com>...
        I am trying to conert a SQL Server (2000) database to Oracle to see if
        it is a supportable back end for my product. I am running into a
        stone wall with Stored Procedures though. I was wondering if someone
        could explain a simple way to turn this T-SQL statement into a Oracle
        PL/SQL statement:

        CREATE PROCEDURE [CrossTab - Bench Sheet]
        @BSID Int
        AS
        SELECT BenchSheets.*
        FROM BenchSheets
        WHERE BS_ID=@BSID


        I can't seem to find an easy way to do it and documentation isn't very
        helpful. If using a Stored Procedure is the wrong way I am open to
        any alternative to running a "Select" statement with a parameter to
        filter down.

        I appreciate any input,
        >
        I don't know T-SQL that well, but maybe I can help.
        >
        What does [CrossTab - Bench Sheet] mean? It it returning results of
        the query as a crosstab or something? Does it return a cursor to the
        caller?
        >
        Can you show us what the Benchsheet table looks like and an example of
        what the output is supposed to look like?
        >
        Dave
        Sorry, stupid question. That's the name of the procedure. I've been
        too focused on Oracle syntax lately. :~)

        Comment

        Working...