Begin SQL

4D - Documentation   Français   English   German   Spanish   4D v11 SQL, Command Theme List   4D v11 SQL, Command Alphabetical List   4D v11 SQL, Constant Theme List   Back   Previous   Next

version 11


Begin SQL

ParameterTypeDescription
This command does not require any parameters

Description

Begin SQL is a keyword that can be used in the Method editor to indicate the beginning of a sequence of SQL commands that must be interpreted by the current data source of the process (the integrated SQL engine of 4D or any source specified via the SQL LOGIN command).

A sequence of SQL commands started with Begin SQL must be closed with the End SQL keyword.

These keywords work as follows:

You can place one or more blocks of Begin SQL/End SQL tags in the same method. You can generate methods made up entirely of SQL code or mix 4D code and SQL code in the same method.

You can write several SQL statements on the same line or on different lines by separating them with a semi-colon ";". For example, you can write:

   Begin SQL 
      INSERT INTO SALESREPS (NAME, AGE) VALUES ('Henry',40);
      INSERT INTO SALESREPS (NAME, AGE) VALUES ('Bill',35)
   End SQL

or:
   Begin SQL 
      INSERT INTO SALESREPS (NAME, AGE) VALUES ('Henry',40);INSERT INTO SALESREPS (NAME, AGE) VALUES ('Bill',35) 
   End SQL

Note that the 4D Debugger will evaluate the SQL code line by line. In certain cases, it may be preferable to use more than one line.

See Also

End SQL, Get current data source, SQL LOGIN.


4D - Documentation   Français   English   German   Spanish   4D v11 SQL, Command Theme List   4D v11 SQL, Command Alphabetical List   4D v11 SQL, Constant Theme List   Back   Previous   Next