SQL_GET_STMT¶
Applies to: ORAFlex SQLFlex MYSQLFlex PGFlex DB2Flex
This command returns the last embedded SQL statement that was executed into a string. Optional parameters can be passed to specify what character to start the string at and also the maximum number of characters to allow for the string.
Syntax
SQL_GET_STMT to {variable} [{max} {start}]
Parameter |
Description |
---|---|
variable |
SQL statement to be executed |
max |
Indicates the maximum number of characters to get (optional) |
start |
Indicates what character to start at for the returned string (optional) |
Example
SQL_SET_STMT to "SELECT * FROM CUSTOMER WHERE STATUS = 'Active' "
SQL_PREPARE_STMT
SQL_EXECUTE_STMT
SQL_FETCH_NEXT_ROW into sFirstName sLastName
If (Found) Begin
Showln sFirstName
Showln sLastName
End
SQL_GET_STATEMENT to sValue
Showln sValue
SQL_GET_STATEMENT