Table of ContentsPreviousNext

Ispirer
Please, note, that Ispirer SQLWays 6.0 is no longer supported and provided to clients.
You can try out automated conversion of databases and applications with Ispirer Toolkit for free. Download free trial.
Check out the relevant toolkit documentation.
Ispirer SQL Server to DB2 Migration overview.


Ispirer SQLWays Database Migration Software

Result Set Conversion from Microsoft SQL Server to IBM DB2

A standalone SELECT statement returns the result set to the client application from a Microsoft SQL Server procedure.

In order to return a result set from a DB2 procedure, you have to declare a cursor with the WITH RETURN option, and open the cursor.

SQLWays converts Microsoft SQL Server standalone SELECT statements to DECLARE WITH RETURN cursors and OPEN statements in IBM DB2.

TABLE 74. Example of Result Set Conversion from Microsoft SQL Server to IBM DB2
Microsoft SQL Server
IBM DB2
create procedure SalesOrder_Test 
as
begin
select * from Customers
end 
create procedure SalesOrder_Test ( ) 
LANGUAGE SQL
DYNAMIC RESULT SETS 1
begin
DECLARE cur1 CURSOR WITH RETURN 
FOR select   *   from Customer s;
open cur1;
end  


Table of ContentsPreviousNext
Copyright 1999-2023 Ispirer Systems.
Ispirer and SQLWays are registered trademarks. All other product names may be trademarks of the respective companies.
All rights reserved.