Back to Browse

Coding in RPG (IBM i/AS400). Using the Merge SQL statement

1.2K views
Mar 31, 2024
11:19

In many programs, we have the need to insert a record into a table, or, if it already exists, insert a new one... To do this, many of us do it checking the value of sqlcod. We do the update, and if it fails because the record does not exist, then we add a new record... There is a simpler, and more elegant, way to do this, using the Merge statement. In this video I show you an example of how you can use it. Please, let me know what you think about it. Leave your comments below. Don't forget to subscribe! #ibmi #ibm #rpg #rpgle #rpgfree #newvideo #ibmtraining #ibmcoding #rpgtraining #sqltraining #as400 #common #modernize #sql #ibmchampion 0:00 Introduction 0:33 Showing the table that Im going to play with 1:05 Let's use Merge for updating or inserting records on this table 5:12 Changing the statement for deleting records 5:44 Let's use Merge for updating or inserting records on a target table from a source table 10:48 Final comments and ending

Download

0 formats

No download links available.

Coding in RPG (IBM i/AS400). Using the Merge SQL statement | NatokHD