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
로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.
좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.
eospos365
질문됨 일 년 전
eunjeong
질문됨 2년 전
ckhan
yangjinyoung
IRON
게시됨 3년 전
Hyunjoong Shin
게시됨 2년 전
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