Example: A 13   LPAD: Omitting the third parameter
CREATE FUNCTION LPAD (C1 VarChar(4000), N integer)
 RETURNS VARCHAR(4000)
 LANGUAGE SQL
 SPECIFIC LPADParm2
 DETERMINISTIC
 CONTAINS SQL
 NO EXTERNAL ACTION
 RETURN 
 LPAD(C1,N,   )
;
And the results of Example A 13 should look like those in Example A 14.
Example: A 14   Result of LPAD: Omitting the third parameter
SELECT char(lpad( ABCDE ,15),20) FROM SYSIBM.SYSDUMMY1;
                                                   
1                    
                     
          ABCDE      
    1 record(s) selected.
                                                                          
SELECT char(lpad( ABCDE ,3),20) FROM SYSIBM.SYSDUMMY1;
                                                   
1                    
                     
ABC                  
    1 record(s) selected.
Two more LPAD UDFs with different characteristics are shown in Example A 15.
Example: A 15   LPAD: The first parameter is integer, 2, and 3 parameters
CREATE FUNCTION LPAD (I1 Integer, N integer, C2 Varchar(4000))
 RETURNS VARCHAR(4000)
 LANGUAGE SQL
 SPECIFIC LPADIntParm3
 DETERMINISTIC
 CONTAINS SQL
 NO EXTERNAL ACTION
344 
MySQL to DB2 UDB Conversion Guide






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