String Literals
Embedded SQL string literals are delimited by single quotes. For example:
exec sql update employee &
set salary = 30000.00 &
where name = 'Newman'
Quotes cannot be embedded in a string literal. If you want to use a quote in a character string in an Embedded SQL statement, assign the string into a string variable or a BASIC string constant and use the string variable or constant in the SQL statement. For example:
comm_str = "Doesn't seem to relax"
exec sql update employee &
set comments = :comm_str &
where eno = :numvar
You can also declare a BASIC string constant. Following BASIC rules, you cannot continue string literals over more than one line.
Last modified date: 08/14/2024