Difference between revisions of "SET SQL"
Yvonnemilne (Talk | contribs) |
Yvonnemilne (Talk | contribs) |
||
(8 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | + | ''No longer required in Recital 10'' | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
==Purpose== | ==Purpose== | ||
Line 12: | Line 7: | ||
==Syntax== | ==Syntax== | ||
SET SQL ON | OFF | (<expL>) | SET SQL ON | OFF | (<expL>) | ||
+ | |||
SET SQL TO RECITAL | VFP | MYSQL | SET SQL TO RECITAL | VFP | MYSQL | ||
+ | |||
+ | |||
+ | ==See Also== | ||
+ | [[SET PAUSE]], [[SET SQLDIALECT]], [[:Category:SQL|SQL]] | ||
Line 24: | Line 24: | ||
==Example== | ==Example== | ||
− | < | + | <code lang="recital"> |
> set sql on | > set sql on | ||
− | Recital/SQL> select * from accounts;</ | + | Recital/SQL> select * from accounts; |
+ | </code> | ||
==Products== | ==Products== | ||
− | Recital | + | Recital Server, Recital |
[[Category:Documentation]] | [[Category:Documentation]] | ||
[[Category:Commands]] | [[Category:Commands]] | ||
− | [[Category:Set_Commands]] | + | [[Category:Set_Commands|SQL]] |
[[Category:SQL]] | [[Category:SQL]] | ||
+ | [[Category:SQL Set Commands]] | ||
+ | [[Category:Terminal Environment]] | ||
+ | [[Category:Terminal Environment Set Commands]] |
Latest revision as of 15:57, 5 July 2011
No longer required in Recital 10
Purpose
Enable or disable use of SQL statements
Syntax
SET SQL ON | OFF | (<expL>)
SET SQL TO RECITAL | VFP | MYSQL
See Also
SET PAUSE, SET SQLDIALECT, SQL
Description
When SQL is set ON, commands that follow are assumed to be SQL, not Recital/4GL. In the development environment of Recital Terminal Developer, the interactive SQL prompt will be displayed and valid Recital/ SQL commands can be executed. Most of the Recital non-SQL commands can also be executed, but commands that conflict with SQL are not permitted. When SQL is set OFF, the normal Recital prompt is displayed. By default, SQL is OFF.
The SET SQL ON command can also be used in config.db configuration files for session, application or system wide setting. Since it affects the compilation of programs, it should be set prior to compilation rather than in a program itself. Program files with a ’.sql’ file extension are automatically compiled and run with SET SQL ON. When SQLDIALECT is set to Recital, embedded SQL commands within programs must be preceded by the EXEC SQL command unless SET SQL is ON.
The SET SQL TO <dialect> command is synonymous with the SET SQLDIALECT TO <dialect> command.
Example
> set sql on Recital/SQL> select * from accounts;
Products
Recital Server, Recital