All Forums Database
harsha reddy 5 posts Joined 02/08
05 Feb 2008
converting from oracle to teradata

Hi ThereI used to work with oracle.Now i am new to teradata below is the custom sql that is in oracle now i need to write this in teradata.months_between(trunc(sysdate,'mon') ,to_date((V_T_A_Pmr.Yearmonth*100+1),'yyyymmdd') ) <=25Please suggest me how to right in oracle.ThanksHarsha.

joedsilva 505 posts Joined 07/05
05 Feb 2008

Try rewriting the logic to something like this. (This may not be very accurate as I am not sure what those oracle functions do, but this should be a good starting point for you if you are stuck !)ADD_MONTHS( CAST( (TRIM(YM*100+01)) AS DATE FORMAT'YYYYMMDD') , 25 ) <= CURRENT_DATE

You must sign in to leave a comment.