MySQL
DB2 UDB
Comment
LPAD
no equivalent. Implement 
Refer to UDF LPAD in 
using UDF
Appendix A.3,  Sample 
code for RPAD and LPAD 
functions  on page 339
MID
SUBSTR
Function MID is synonym 
for SUBSTR
REVERSE
SET 
(RESTSTR, LEN) = (INSTR, 
Implement UDF. For the 
LENGTH(INSTR));
complete code of the 
WHILE 
LEN > 0 
DO
SET 
(REVSTR, RESTSTR, LEN)
= 
example refer to IBM DB2 
(SUBSTR(RESTSTR, 1, 1) || 
UDB SQL Reference, 
REVSTR,SUBSTR(RESTSTR, 2, 
LEN   1),LEN   1);
Volume 1, V8, SC09 4844
END WHILE;
RPAD
no equivalent. Implement 
Refer to UDF RPAD in 
using UDF
Appendix A.3,  Sample 
code for RPAD and LPAD 
functions  on page 339
STRCMP
CASE
Implement using CASE 
expression and VALUES 
statement
SUBSTRING_INDEX
no equivalent. Implement 
Refer to UDF 
using UDF
SUBSTRING_INDEX in 
Appendix A.7,  Sample 
code for 
SUBSTRING_INDEX  on 
page 360
TRIM (1 arg)
LTRIM,RTRIM
Requires string 
manipulation
TRIM; Many char 
LTRIM,RTRIM
Requires string 
extension
manipulation
TRIM; Substring extension
LTRIM,RTRIM
Requires string 
manipulation
7.1.7  Implicit casting of data types
We have found significant differences in the way MySQL and DB2 UDB handle 
the casting of data types. Unless explicitly using the CAST function, DB2 does 
not convert strings representing numeric values. Example 7 9 shows how 
MySQL implicitly casts the character value
 5
 to an integer value to resolve the 
query. Implicit casting is not only performed in unambiguous cases as shown in 
 Chapter 7. Application porting 
163






footer




 

 

 

 

 Home | About Us | Network | Services | Support | FAQ | Control Panel | Order Online | Sitemap | Contact

san diego web hosting

 

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