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

Home -> Community -> Usenet -> c.d.o.server -> MSSQLServer->Oracle: Identity and returning a result set using oracle procedure or function

MSSQLServer->Oracle: Identity and returning a result set using oracle procedure or function

From: Vesa Nopanen <nopanen_at_quartal.com>
Date: Mon, 27 Aug 2001 12:46:24 +0300
Message-ID: <9md4ta$118$1@news.clinet.fi>


Hello

We are converting a MS SQLServer database and functionality to Oracle database and so far we have ran into two bigger problematics. IDENTITY. We use automatically updating ID field is several tables. Oracle does not seem to have a similar feature. SEQUENCE is almost the answer week are seeking; but you can not place call to sequence's nextval into table definition (DEFAULT). Are we correct if we assume that we only have two ways of solving this issue: either updating every INSERT from our application logic to include call to sequence to get nextval or write a trigger to each table that requires a Identity value?

Second question is of result sets. In SQLServer you can write a stored procedure with a select clause at the end. So when you call a stored procedure from business logic you get a result set back like you had called any other select. This is possible to do in DB2 also if Stored Procedure is defined to return result sets , opening a cursor in procedure and exiting from stored procedure without closing it. Is there a way to archieve the same result in Oracle?

Thank you for your time!
Vesa Nopanen

--

Q u a r t a l    O y

Vesa Nopanen, Senior Database Designer (nopanen_at_quartal.com)
http://www.quartal.com
Received on Mon Aug 27 2001 - 04:46:24 CDT

Original text of this message

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