ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/public/ibx/trunk/examples/scriptengine/tests/createproc.sql
Revision: 37
Committed: Mon Feb 15 14:44:25 2016 UTC (8 years, 9 months ago) by tony
Content type: application/sql
File size: 661 byte(s)
Log Message:
Committing updates for Release R1-4-0

File Contents

# User Rev Content
1 tony 37 /* This test illustrates the different ways it is possible to define a stored procedure */
2    
3     /*Case 1. No statement terminator - also tests ignoring reserved words in comments*/
4    
5     Create Procedure MyProc1
6     As
7     Declare THECOUNTRY VarChar(32);
8     Begin
9     //Begin
10     THECOUNTRY = '';
11     Update COUNTRY SET COUNTRY = 'None' Where COUNTRY = :THECOUNTRY;
12     /* End */
13     End
14    
15    
16     /*Case 2. ';' as statement terminator*/
17    
18     Create Procedure MyProc2
19     As
20     Begin
21     Update COUNTRY SET COUNTRY = 'None' Where COUNTRY = '';
22     End;
23    
24     /*Case 3. '^' as statement terminator*/
25    
26     set term ^;
27     Create Procedure MyProc3
28     As
29     Begin
30     Update COUNTRY SET COUNTRY = 'None' Where COUNTRY = '';
31     End^
32     set term ;^
33    
34    
35