Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Code Conversion from MSSQL into Oracle

Re: Code Conversion from MSSQL into Oracle

From: Akshay Kumar <akshay349_at_hotmail.com>
Date: Fri, 12 Dec 2003 13:39:26 -0800
Message-ID: <F001.005D9B55.20031212133926@fatcity.com>


Content-Type: text/plain;
 charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

oracle provides a toolkit.

  Are there any TOOLs for converting Sample Code (like the following) = from MSSQL into Oracle?

  SAMPLE :-


  DECLARE @entity_id char(32), @branch_id char(9)

  DECLARE cur_temp_GEMT CURSOR FOR select

           branch_id,entity_id from GEMT where other_party_name=3D'' and = entity_type=3D'D'

  OPEN cur_temp_GEMT =20

          =20

  FETCH NEXT FROM cur_temp_GEMT INTO

@branch_id,@entity_id

       =20

  WHILE @@FETCH_STATUS =3D 0   BEGIN   UPDATE GEMT SET other_party_name=3D(SELECT name from GEAT where = branch_id =3D_at_branch_id and entity_id=3D_at_entity_id and addr_type=3D'1' = and entity_type=3D'D') where entity_id=3D_at_entity_id and branch_id =3D = @branch_id

  FETCH NEXT FROM cur_temp_GEMT INTO

@branch_id,

@entity_id

  END   CLOSE cur_temp_GEMT

  DEALLOCATE cur_temp_GEMT

------=_NextPart_000_0038_01C3C0CF.1A3155F0 Content-Type: text/html;
 charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1264" name=3DGENERATOR> <STYLE>@page Section1 {size: 8.5in 11.0in; margin: 1.0in 1.25in 1.0in = 1.25in; }
P.MsoNormal {

        FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman" }
LI.MsoNormal {

        FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman" }
DIV.MsoNormal {

        FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman" }
A:link {

        COLOR: blue; TEXT-DECORATION: underline }
SPAN.MsoHyperlink {

        COLOR: blue; TEXT-DECORATION: underline }
A:visited {

        COLOR: purple; TEXT-DECORATION: underline }
SPAN.MsoHyperlinkFollowed {

        COLOR: purple; TEXT-DECORATION: underline }
SPAN.emailstyle17 {

        COLOR: red; FONT-FAMILY: "Courier New"
}
SPAN.EmailStyle18 {

        COLOR: red; FONT-FAMILY: "Courier New"
}
DIV.Section1 {

        page: Section1
}

</STYLE>
</HEAD>
<BODY lang=3DEN-US vLink=3Dpurple link=3Dblue bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>oracle provides a toolkit.</FONT></DIV>
<DIV>&nbsp;</DIV>
<BLOCKQUOTE dir=3Dltr=20

style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; = BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">   <DIV style=3D"FONT: 10pt arial">----- Original Message ----- </DIV>   <DIV=20
  style=3D"BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: = black"><B>From:</B>=20
  <A title=3DVIVEK_SHARMA_at_infosys.com=20   href=3D"mailto:VIVEK_SHARMA_at_infosys.com">VIVEK_SHARMA</A> </DIV>   <DIV style=3D"FONT: 10pt arial"><B>To:</B> <A = title=3DORACLE-L_at_fatcity.com=20
  href=3D"mailto:ORACLE-L_at_fatcity.com">Multiple recipients of list = ORACLE-L</A>=20
  </DIV>
  <DIV style=3D"FONT: 10pt arial"><B>Sent:</B> Friday, December 12, 2003 = 1:14=20
  AM</DIV>
  <DIV style=3D"FONT: 10pt arial"><B>Subject:</B> RE: Code Conversion = from MSSQL=20
  into Oracle</DIV>
  <DIV><BR></DIV>
  <DIV class=3DSection1>
  <P class=3DMsoNormal><FONT face=3D"Times New Roman" size=3D3><SPAN=20
  style=3D"FONT-SIZE: 12pt"></SPAN></FONT>&nbsp;</P>   <P class=3DMsoNormal><FONT face=3D"Courier New" color=3Dred = size=3D2><SPAN=20
  style=3D"FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Courier New'">Are = there any=20
  TOOLs for converting Sample Code (like the following) from MSSQL into=20   Oracle?</SPAN></FONT></P>
  <P class=3DMsoNormal><FONT face=3D"Courier New" color=3Dred = size=3D2><SPAN=20
  style=3D"FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Courier = New'"></SPAN></FONT>&nbsp;</P>
  <P class=3DMsoNormal><FONT face=3D"Courier New" color=3Dred = size=3D2><SPAN=20
  style=3D"FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Courier = New'">SAMPLE=20
  :-</SPAN></FONT></P>
  <P class=3DMsoNormal><FONT face=3D"Courier New" color=3Dred = size=3D2><SPAN=20
  style=3D"FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Courier = New'">--------</SPAN></FONT></P>
  <P class=3DMsoNormal><FONT face=3D"Courier New" color=3Dred = size=3D2><SPAN=20
  style=3D"FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Courier = New'">DECLARE=20
  @entity_id char(32), @branch_id char(9)</SPAN></FONT></P>   <P class=3DMsoNormal><FONT face=3D"Courier New" color=3Dred = size=3D2><SPAN=20
  style=3D"FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Courier = New'"></SPAN></FONT>&nbsp;</P>
  <P class=3DMsoNormal><FONT face=3D"Courier New" color=3Dred = size=3D2><SPAN=20
  style=3D"FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Courier = New'">DECLARE&nbsp;=20
  cur_temp_GEMT CURSOR FOR select</SPAN></FONT></P>   <P class=3DMsoNormal><FONT face=3D"Courier New" color=3Dred = size=3D2><SPAN=20
  style=3D"FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Courier = New'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20   branch_id,entity_id from GEMT where other_party_name=3D'' and=20   entity_type=3D'D'</SPAN></FONT></P>
  <P class=3DMsoNormal><FONT face=3D"Courier New" color=3Dred = size=3D2><SPAN=20
  style=3D"FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Courier = New'"></SPAN></FONT>&nbsp;</P>
  <P class=3DMsoNormal><FONT face=3D"Courier New" color=3Dred = size=3D2><SPAN=20
  style=3D"FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Courier New'">OPEN =

  cur_temp_GEMT&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = </SPAN></FONT></P>
  <P class=3DMsoNormal><FONT face=3D"Courier New" color=3Dred = size=3D2><SPAN=20
  style=3D"FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Courier = New'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20   </SPAN></FONT></P>
  <P class=3DMsoNormal><FONT face=3D"Courier New" color=3Dred = size=3D2><SPAN=20
  style=3D"FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Courier = New'">FETCH NEXT=20
  FROM cur_temp_GEMT INTO</SPAN></FONT></P>   <P class=3DMsoNormal><FONT face=3D"Courier New" color=3Dred = size=3D2><SPAN=20
  style=3D"FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Courier = New'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
  @branch_id,@entity_id</SPAN></FONT></P>   <P class=3DMsoNormal><FONT face=3D"Courier New" color=3Dred = size=3D2><SPAN=20
  style=3D"FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Courier = New'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
  </SPAN></FONT></P>
  <P class=3DMsoNormal><FONT face=3D"Courier New" color=3Dred = size=3D2><SPAN=20
  style=3D"FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Courier = New'">WHILE=20
  @@FETCH_STATUS =3D 0</SPAN></FONT></P>   <P class=3DMsoNormal><FONT face=3D"Courier New" color=3Dred = size=3D2><SPAN=20
  style=3D"FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Courier = New'"></SPAN></FONT>&nbsp;</P>
  <P class=3DMsoNormal><FONT face=3D"Courier New" color=3Dred = size=3D2><SPAN=20
  style=3D"FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Courier = New'">BEGIN</SPAN></FONT></P>
  <P class=3DMsoNormal><FONT face=3D"Courier New" color=3Dred = size=3D2><SPAN=20
  style=3D"FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Courier = New'"></SPAN></FONT>&nbsp;</P>
  <P class=3DMsoNormal><FONT face=3D"Courier New" color=3Dred = size=3D2><SPAN=20
  style=3D"FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Courier = New'"></SPAN></FONT>&nbsp;</P>
  <P class=3DMsoNormal><FONT face=3D"Courier New" color=3Dred = size=3D2><SPAN=20
  style=3D"FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Courier = New'">UPDATE GEMT=20
  SET other_party_name=3D(SELECT name from GEAT where branch_id = =3D_at_branch_id and=20

  entity_id=3D_at_entity_id and&nbsp; addr_type=3D'1' and =
entity_type=3D'D') where=20
  entity_id=3D_at_entity_id and branch_id =3D @branch_id</SPAN></FONT></P>
  <P class=3DMsoNormal><FONT face=3D"Courier New" color=3Dred = size=3D2><SPAN=20
  style=3D"FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Courier = New'"></SPAN></FONT>&nbsp;</P>
  <P class=3DMsoNormal><FONT face=3D"Courier New" color=3Dred = size=3D2><SPAN=20
  style=3D"FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Courier = New'">FETCH NEXT=20
  FROM cur_temp_GEMT INTO</SPAN></FONT></P>   <P class=3DMsoNormal><FONT face=3D"Courier New" color=3Dred = size=3D2><SPAN=20
  style=3D"FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Courier = New'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
  @branch_id,</SPAN></FONT></P>
  <P class=3DMsoNormal><FONT face=3D"Courier New" color=3Dred = size=3D2><SPAN=20
  style=3D"FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Courier = New'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
  @entity_id</SPAN></FONT></P>
  <P class=3DMsoNormal><FONT face=3D"Courier New" color=3Dred = size=3D2><SPAN=20
  style=3D"FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Courier = New'"></SPAN></FONT>&nbsp;</P>
  <P class=3DMsoNormal><FONT face=3D"Courier New" color=3Dred = size=3D2><SPAN=20
  style=3D"FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Courier = New'"></SPAN></FONT>&nbsp;</P>
  <P class=3DMsoNormal><FONT face=3D"Courier New" color=3Dred = size=3D2><SPAN=20
  style=3D"FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Courier = New'">END</SPAN></FONT></P>
  <P class=3DMsoNormal><FONT face=3D"Courier New" color=3Dred = size=3D2><SPAN=20
  style=3D"FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Courier = New'"></SPAN></FONT>&nbsp;</P>
  <P class=3DMsoNormal><FONT face=3D"Courier New" color=3Dred = size=3D2><SPAN=20
  style=3D"FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Courier = New'">CLOSE=20
  cur_temp_GEMT</SPAN></FONT></P>
  <P class=3DMsoNormal><FONT face=3D"Courier New" color=3Dred = size=3D2><SPAN=20
  style=3D"FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Courier = New'">DEALLOCATE=20
  cur_temp_GEMT</SPAN></FONT></P>
  <P class=3DMsoNormal><FONT face=3D"Courier New" color=3Dred = size=3D2><SPAN=20
  style=3D"FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Courier = New'"></SPAN></FONT>&nbsp;</P>
  <P class=3DMsoNormal><FONT face=3D"Courier New" color=3Dred = size=3D2><SPAN=20
  style=3D"FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Courier = New'"></SPAN></FONT>&nbsp;</P></DIV></BLOCKQUOTE></BODY></HTML>

------=_NextPart_000_0038_01C3C0CF.1A3155F0--

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Akshay Kumar
  INET: akshay349_at_hotmail.com

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Fri Dec 12 2003 - 15:39:26 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US