Title: Re: Code Conversion from MSSQL into Oracle
10 years ago or so, I wrote a 105 line script for the UNIX “sed” (a.k.a. “stream editor”) command to convert Teradata “BTEQ” scripts into Oracle SQL*Plus.  Painful, yet thrilling, and it took only about a day of concentration with the O’Reilly “Awk and Sed” book at hand.

I’ll bet you can write something (whether in “sed” or “awk” or Perl or Java) faster than it takes you find a TransactSQL-to-PL/SQL converter...?  And if you don’t know Perl (probably the best choice) yet, this exercise could be the opportunity to put a huge new skill into the old skillset...

Just a thought...



on 12/11/03 4:49 AM, VIVEK_SHARMA at [EMAIL PROTECTED] wrote:



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='' and entity_type='D'



OPEN cur_temp_GEMT       

        

FETCH NEXT FROM cur_temp_GEMT INTO

     @branch_id,@entity_id

     

WHILE @@FETCH_STATUS = 0



BEGIN





UPDATE GEMT SET other_party_name=(SELECT name from GEAT where branch_id [EMAIL PROTECTED] and [EMAIL PROTECTED] and  addr_type='1' and entity_type='D') where [EMAIL PROTECTED] and branch_id = @branch_id



FETCH NEXT FROM cur_temp_GEMT INTO

     @branch_id,

     @entity_id





END



CLOSE cur_temp_GEMT

DEALLOCATE cur_temp_GEMT






Reply via email to