Using SQL Statements in SQR

Although SELECT may be the most common SQL statement, you can also perform other SQL commands in SQR. Here are a few examples:

  • If the program prints important documents such as checks, tickets, or invoices, you may need to update the database to indicate that the document was printed.

    You can do this in SQR with a SQL UPDATE statement.

  • You can use SQR to load data into the database.

    SQR can read and write external files and construct records. SQR can also insert these records into the database by using a SQL INSERT statement.

  • To hold intermediate results in a temporary database table, you can create two SQL paragraphs in the SQR program (CREATE TABLE and DROP TABLE) to create this table at the beginning of the program and drop the table at the end.

These are only a few examples. SQR can perform any SQL statement, and this feature is used often.