Products Downloads


French version


 

 

ADELIA

      

      

      

      

(I/B)

 

 

 

 

 

Section for use

All

 

Syntax

BEGIN_SQL

 

Description

This instruction is used to define a SQL instruction in an Adelia program. Such a SQL instruction must be placed between the instructions BEGIN_SQL and END_SQL. Each line comprising the SQL instruction must begin with the sign "+".

 

Every BEGIN_SQL instruction must have a corresponding END_SQL instruction.

For further details, see the topic Integrating SQL into ADELIA Programs.

 

Important note: There can only be one SQL instruction between the BEGIN_SQL and END_SQL instructions.

 

Example

BEGIN_SQL

 

 

+DECLARE C1 CURSOR FOR

:

SQL instruction to select customer

+SELECT CCUSCO, CCUSNA

:

code and name from CUSTOM file

+FROM CUSTOM

:

for all records where payment code

+WHERE CPAYCO = :W_PAYMENT_CODE

:

is equal to a work field

 

:

(W_PAYMENT_CODE)

+ORDER BY CCUSNA

:

(sort by customer name)

END_SQL

 

 

 

See also the list of 4GL instructions by topic

↑ Top of page


  • Aucune étiquette