× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



The presentation I posted about in 

http://archive.midrange.com/midrange-l/200603/msg00262.html 

has some simple side-by-side examples of stored procedures on both systems.
-------------- Original message -------------- 
From: "Elvis Budimlic" <ebudimlic@xxxxxxxxxxxxxxxxxxxxxxxxx> 

> Scott, 
> DB2 UDB for iSeries supports returning multiple result sets but what you've 
> shown will not work with DB2 since it doesn't look like standard SQL syntax. 
> Syntax you've shown looks simpler for sure, but IBM's committed to sticking 
> with standards. 
> 
> Checkout these two links for examples how to do it. It's actually pretty 
> easy. 
> 
> http://tinyurl.com/prmak 
> http://tinyurl.com/ms6jt 
> 
> And finally, I strongly recommend your .NET developer downloads redbook 
> "Stored Procedures, Triggers and User Defined Functions on DB2 Universal 
> Database for iSeries" available at this link: 
> 
> http://www.redbooks.ibm.com/abstracts/SG246503.html?Open 
> 
> I find it very useful. 
> Good luck with your project. 
> 
> Elvis 
> 
> -----Original Message----- 
> Subject: Translating SQL Server stored procedure to DB2 stored procedure 
> 
> 
> Below is an example of a SQL Server 2000 stored procedure 
> that we use in a query tool that we built for one 
> of our web-based Wintel applications. It is called 
> from a C#.NET application. 
> 
> CREATE PROCEDURE dbo.prc_AH_GetReportsList AS 
> 
> select * from ah_objects 
> select ReportID,ObjectID,ReportName,ReportDescription,DateCreated, 
> UserIDCreated,isnull(DateModified,'') as DateModified, 
> isnull(UserIDModified,'') as UserIDModified,Private, 
> UserNameCreated, isnull(UserNameModified,'') as UserNameModified from 
> AH_Reports 
> 
> We now want to extend this query tool so it can access our DB2 databases 
> for our iSeries application using the .NET data provider included with 
> iSeries 
> Access. 
> 
> My .NET developer is asking if a DB2 stored procedure can return data 
> via multiple select statements (as shown above) without the use of record 
> sets? 
> 
> Based on his research so far, it seems like using cursors and multiple 
> records 
> sets is the only way. We are working against a V5R3 server for this 
> project. 
> 
> Thanks. 
> ---------------------- 
> 
> Scott A. Schollenberger 
> 
> 
> 
> -- 
> This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list 
> To post a message email: MIDRANGE-L@xxxxxxxxxxxx 
> To subscribe, unsubscribe, or change list options, 
> visit: http://lists.midrange.com/mailman/listinfo/midrange-l 
> or email: MIDRANGE-L-request@xxxxxxxxxxxx 
> Before posting, please take a moment to review the archives 
> at http://archive.midrange.com/midrange-l. 
> 

As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.