Where M1 <> 0
AND S < 32
)
SELECT case when ANS > 0 then ANS else 32 + ANS end
FROM Repeat
WHERE S = (SELECT MAX(S)
FROM Repeat)
;
Example A 22 shows the sample output.
Example: A 22 Sample output of BIT_CNT
db2> values bit_cnt(64)
1
1
1 record(s) selected.
db2> values bit_cnt(63)
1
6
1 record(s) selected.
db2> values bit_cnt( 7)
1
29
1 record(s) selected.
A.7 Sample code for SUBSTRING_INDEX
Example A 23 is a UDF example emulating the behavior of MySQL's
SUBSTRING_INDEX
function. It returns the substring from input string before
counting occurrences of the delimiter.
360
MySQL to DB2 UDB Conversion Guide
footer
Our partners:
PHP: Hypertext Preprocessor Cheap Web Hosting
JSP Web Hosting
Ontario Web Hosting
Jsp Web Hosting
Cheapest Web Hosting
Java Hosting
Cheapest Hosting
Visionwebhosting.net Business web hosting division of Vision Web Hosting Inc.. All rights reserved