Passer au contenu

sql conversion from TD to RS

0

in TD we have -- CAST((CAST(FROM_TIME AS INTEGER) MOD 60) AS FORMAT '99') . How to achieve the same in Redshift?

thanks KN

demandé il y a 3 ans371 vues

1 réponse
2

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))
EXPERT

répondu il y a 3 ans

  • 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

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.