SQL support / Static SQL statements |
The fglcomp compiler parses the static SQL statements and modifies them before writing the resulting SQL text to the .42m module.
You can extract all static SQL statements from the source by using the -S option of fglcomp:
MAIN DEFINE c_name CHAR(10) DEFINE cnt INTEGER DATABASE stock SELECT COUNT(*) INTO cnt FROM customer WHERE customer.cust_name = c_name END MAIN
$ fglcomp -S test.4gl test.4gl^5^SELECT COUNT(*) FROM customer WHERE cust_name = ?