Takes n bit arrays and returns a bitwise OR-ing of its arguments using the following logic: for each bit compared, if any bit is 1, return 1; otherwise, return 0.
BIT_OR( bit-expression )
expression The expression for which the value is to be determined. This is commonly a column name.
SQL/2003 Vendor extension.
The following example generates four rows containing a CHAR column, then converts the values to VARBIT.
SELECT BIT_OR( CAST(row_value AS VARBIT) ) FROM dbo.sa_split_list('0001,0111,0100,0011')
The result 0111 is determined as follows:
A bitwise OR is performed between row 1 (0001) and row 2 (0111), resulting in 0111.
A bitwise OR is performed between the result from the previous comparison (0111) and row 3 (0100), resulting in 0111.
A bitwise OR is performed between the result from the previous comparison (0111) and row 4 (0011), resulting in 0111.
|Envoyer votre avis sur cette page par email.||Copyright © 2009, iAnywhere Solutions, Inc. - SQL Anywhere 11.0.1|