TD一些技巧
/* 欄位轉成屬性 */
sel code
from {table} unpivot
(
(code)
FOR x IN (col01, col02, col03...., col30)
) tmp
where code is not null and code <>''
;
/* HASH_SHA256 */
CASE
WEHN xxx IS NOT NULL THEN HASH_SHA256(TRIM(xxx))
ELSE NULL
END AS xxx_hash
/* 欄位轉成屬性 */
sel code
from {table} unpivot
(
(code)
FOR x IN (col01, col02, col03...., col30)
) tmp
where code is not null and code <>''
;
/* HASH_SHA256 */
CASE
WEHN xxx IS NOT NULL THEN HASH_SHA256(TRIM(xxx))
ELSE NULL
END AS xxx_hash
留言
張貼留言