Using Multiple SQL Statements in an SQL Action

Multiple SQLs in SQL ActionWhile writing App Engines, we normally write one SQL statement per SQL Action. That is how it is in most of the delivered App Engine. But in certain situations, we may need to put in multiple SQL statements into a single SQL Action.

This can be achieved by using %Execute function.

In your SQL Action, place the %Execute() on the very first line. Below that you start writing your SQL statements one by one. Take care to delimit each SQL statement with a semi colon as the App Engine expects a semi colon between statements within an %Execute function by default.

If you are look to in write a PL/SQL block then you should change the default delimiter from semi colon to a forward slash. This can be done by placing a forward slash like this – %Execute(/)

The sample code below would make things clear.

%Execute(); 
 SQL Statement One;
 SQL Statement Two;
 SQL Statement Last;
 
%Execute(/) 
 SQL Statement One/ 
 SQL Statement Two/
 SQL Statement Last/
Tags: ,
Subscribe to Comments RSS Feed in this post
4 Responses
  1. GOOD ONE

Leave a Reply

Your email address will not be published. Required fields are marked *

*
*

Read previous post:
PeopleSoft Journal Uploader
PeopleSoft Journal Import Error – User-defined type not defined

Close