DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/)
-   Oracle (http://www.daniweb.com/forums/forum129.html)
-   -   prblm while converting sql server stored proc to oracle stored proc (http://www.daniweb.com/forums/thread122499.html)

avtar.sohi May 5th, 2008 4:51 am
prblm while converting sql server stored proc to oracle stored proc
 
Hi all,
I m converting stored proc from sql server to oracle.
first have a look sql stored proc.
create procedure xyz..
as
begin
-- i have created one temp table
-- then inserted some data into it by select query over some db table.
-- then i have another temp table
-- then some recored gets inserted into second temp table by help of first temp table and some

avtar.sohi May 5th, 2008 5:35 am
prblm while converting sql server stored proc to oracle stored proc
 
Hi all,
I m converting stored proc from sql server to oracle.
My application call these procedure and got datatable in case of sql server but now client want my applicaiton with oracle, so i m shifting my sql server db to oracle.
first have a look sql stored proc.
create procedure xyz..
as
begin
-- i have created one temp table
-- then inserted some data into it by select query over some db table.
-- then i have another temp table
-- then some recored gets inserted into second temp table by help of first temp table and some other table of db.
-- now finally it update second temp column data on some condition and then send back datatable to my soft. application
end;

what would be the approach to write this procedure in oracle.
please have a look over my oracle procedure which is not working.
create or replace procedure xyz...
as
begin
-- i have opened one cursor with select statement ( these select statement provide me all data which i m getting in second temp table)
-- now how can i update my cursor??????
end;

Thanks lot.
--

peter_budo May 9th, 2008 6:53 am
Re: prblm while converting sql server stored proc to oracle stored proc
 
And what is your question?

PS: Just found you made double post, They been moved together.

avtar.sohi May 12th, 2008 12:07 am
Re: prblm while converting sql server stored proc to oracle stored proc
 
Quote:

Originally Posted by peter_budo (Post 603452)
And what is your question?

PS: Just found you made double post, They been moved together.



my question was how to write that stored proc in oracle?

debasisdas May 14th, 2008 5:08 am
Re: prblm while converting sql server stored proc to oracle stored proc
 
If you are familar with oracle procedures then you just need to take care of the syntax and just implement the logic in PLSQL.

avtar.sohi May 14th, 2008 7:17 am
Re: prblm while converting sql server stored proc to oracle stored proc
 
i understand what was my mistake, i have to use global temp. table to handle this situation.
Tx lot .


All times are GMT -4. The time now is 5:29 am.

Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC