in TD we have -- CAST((CAST(FROM_TIME AS INTEGER) MOD 60) AS FORMAT '99') . How to achieve the same in Redshift?
thanks KN
KN
已提問 3 年前檢視次數 371 次
In Amazon Redshift (RS), the equivalent SQL expression of the Teradata (TD) SQL you provided is as follows:
CAST((CAST(FROM_TIME AS INTEGER) % 60) AS VARCHAR(2))
Sedat SALMAN
已回答 3 年前
thankyou.. How about these ones?
,col1 (format '9(3).99') (CHAR(6)) 35.0 ---> 035.00
,col2 (format '9(5).99') (CHAR(8)) 12,931.10 ---> 12931.10 5,132.40 ---> 05132.40
,cast('3999-12-31' as date) (format 'yymmdd') (char(6)) o/p is 991231
您尚未登入。 登入 去張貼答案。
一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。
Cole
已提問 3 年前
rePost-User-1702160
User-7488645
已提問 1 年前
ShuoYue
Tim
已發佈 2 年前
Jerry_K
thankyou.. How about these ones?
,col1 (format '9(3).99') (CHAR(6)) 35.0 ---> 035.00
,col2 (format '9(5).99') (CHAR(8)) 12,931.10 ---> 12931.10 5,132.40 ---> 05132.40
,cast('3999-12-31' as date) (format 'yymmdd') (char(6))
o/p is 991231