sql_eqlin(X;Y)
Returns a boolean value indicating if X
is
found in Y
. This function has SQL-compatible null handling.
Syntax
sql_eqlin(X;Y)
Input
Argument | Type | Description |
---|---|---|
X |
any simple type | The name of a column of values to compare to all of the values in
Y or in a list. |
Y |
any simple type | The name of a column of values or a list in which to search for
X . |
Return Value
sql_eqlin(X;Y)
returns a boolean value of 1
if
X
is found in Y
and 0
if
X
is not found in Y
.
The data type of the result is integer.
If X
or Y
is N/A (null), the result is also N/A.
Example
In this example, there are several ways of showing how sql_eqlin(X;Y)
works.
The values in colx
are compared to a list of values to determine if the
values in colx
are in the list. The results are in the
sqleqlin_list
column.
The values in colx
are compared to the values in coly
to
determine if the colx
values are found in coly
values. The
results are in the sqleqlin_coly
column.
<table cols="colx,coly"> 899,3; 38,38; 21,770; 10,20; 2700,10; 986,986; ,; ,9; 66,; </table> <willbe name="sqleqlin_list" label="SQL Null" value="sql_eqlin(colx;38 9 986 95 10 800 21)"/> <willbe name="sqleqlin_coly" label="SQL Null" value="sql_eqlin(colx;coly)"/>
Note: There isn't a similar function to
sql_eqlin(X;Y)
to use for a
one-to-one comparison of null value handling.