Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Migration From Sql Server to Oracle

Status
Not open for further replies.

buh

Programmer
Apr 3, 2002
27
0
0
US
Hi Friends,

Basically I am a PB Programmer. We have developed an Accounting Package which is currently running on Sql Server 7.0. One of our client wants to use our Package with Oracle as Database. So, we plan to convert from Sql Server to Oracle. But the problem is, We have used Stored Procedures extensively in Sql Server. I don't know the syntax to convert the same to Oracle Procedures or function. But I have some basic idea of Oracle. I will just post a Sql Server Stored Procedure below.

Please try to give similar Oracle Stored Procedures. If anybody gives a start, i can pickup from that. Because,When I search thru the net, no body is giving the right information about migration.
Here is the code. It is urgent.

Stored Procedures
=================
drop procedure p_recalc_doc_date
go

create procedure p_recalc_doc_date
( @ai_comp_code numeric(3)
, @adtm_start_date datetime
)
as
begin
declare @ls_item_code varchar(15)
, @ls_move_type varchar(3)
, @ldc_avg_cost numeric(17,7)
, @ldtm_start_date datetime
, @ldtm_purch_date datetime
, @ll_count numeric(4)
, @ls_link_type char(1)

-- create temporary table to collect the doc_id other than 'ADJ'
create table #doc_ids_all
( doc_id varchar(3) )

insert into #doc_ids_all
select distinct doc_id
from item_movement_detail
where company_code = @ai_comp_code
and move_type in ('GRV', 'GRR', 'MIX')
and year = datepart(yy, @adtm_start_date)
and month = datepart(mm, @adtm_start_date)

end
go
 
Hi,
Your best bet, given the extensive differences between SqlServer and Oracle procedures, is to use the Oracle Migration Utility to at least make a 'first pass' at converting.

[profile]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top