Use the @STREQ
function to determine whether or not two string (character) columns or literal strings are equal. Enclose literals within single quote marks. @STREQ
returns the following:
1
(true) if the strings are equal.
0
(false) if the strings are not equal.
For this function, Oracle GoldenGate supports the use of an escape sequence to represent characters in a string column in Unicode or in the native character encoding of the Microsoft Windows, UNIX, and Linux operating systems.
Trailing spaces are truncated before comparing the strings.
This function does not support NCHAR
or NVARCHAR
data types.
Syntax
@STREQ (string1, string2)
Example
The following compares the value of the region
column to the literal value EAST
. If region
= EAST
, the record passes the filter.
FILTER (@STREQ (region, 'EAST'))
You could use @STREQ
in a comparison to determine a result, as shown in the following example. If the state is NY
, the expression returns East Coast
. Otherwise, it returns Other
.
@IF (@STREQ (state, 'NY'), 'East Coast', 'Other')