Writing SELECT statements
The following sections explain how to issue SQL SELECT statements using basic VA Smalltalk / VAST Platform. For instructions regarding updating, inserting, and deleting rows in a database, see Writing UPDATE, INSERT, and DELETE statements.
The instructions in this section contain the following information:
Basic techniques for issuing queries
Examples of querying databases.
For most simple queries, you code the same series of Smalltalk expressions. When you write Smalltalk code to issue a database query, follow these general guidelines:
Enclose the query itself in single quotation marks.
Any strings included in the query (such as a select condition), need to be enclosed in two sets of single quotation marks.
To include a string literal of type GRAPHIC, VARGRAPHIC, or LONG VARGRAPHIC, use the format G'string_literal'.
The following is an example of a query statement to be issued in a Smalltalk expression:
'SELECT *
FROM STAFF
WHERE (STAFF.NAME LIKE 'L%')'
Last modified date: 10/03/2020