数据仓库服务 GAUSSDB(DWS)-Teradata格式:类型转换时优先执行数据库操作

时间:2024-12-10 11:28:49

类型转换时优先执行数据库操作

输入

输出

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
REPLACE VIEW SC.VIEW_1 
 ( 
 col_1 
 ) 
 LOCKING TABLE sc.tab FOR AC CES S 
 AS 
 SEL 
 (COALESCE(TRIM(TGT.col_1),'')) || '_' || (COALESCE(TRIM(TGT.col_1),'')) (CHAR(22)) AS col_1 
 FROM 
 sc.tab TGT 
 ;
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
CREATE 
      OR REPLACE VIEW SC.VIEW_1 (col_1)  
     /*LOCKING TABLE sc.tab FOR ACCESS */ 
      AS ( 
           SELECT 
                    CAST(  
                     ( COALESCE( TRIM( TGT.col_1 ) ,'' ) ) || '_' || ( COALESCE( TRIM( TGT.col_1 ) ,'' ) ) 
                    AS CHAR( 22 ) ) AS col_1 
                FROM 
                     sc.tab TGT 
      ) ;
support.huaweicloud.com/tg-dws/dws_16_0101.html