How to translate this query into teradata?

Database
Enthusiast

How to translate this query into teradata?

Hi everyone:

Who can tell me how to translate this query into Teradata?
This queries as below come from SQL server 2005:
1. CAST(CONVERT(CHAR(2), MonthNumberOfYear) + '/ ' + '1/' + CalendarYear AS DATETIME) AS MonthNameValue
2. Left([Model], 1) + Right([Model], 3)

I was blocked by this problems because I'm not familiar with Teradata.
Any response is appreciated.

Thanks^_^
Winnie
2 REPLIES
Enthusiast

Re: How to translate this query into teradata?

1. CAST(CONVERT(CHAR(2), MonthNumberOfYear) + '/ ' + '1/' + CalendarYear AS DATETIME) AS MonthNameValue
cast(cast((MonthNumberOfYear (format '99')) as character(2)) || '/01/' || CalendarYear as datetime format 'MM/DD/YYYY')
(suppose MonthNumberOfYear is numeric and CalendarYear is character)

2. Left([Model], 1) + Right([Model], 3)
substring(MODEL from 1 for 1) || substring(MODEL from character_length(MODEL) - 2 for 3)
Enthusiast

Re: How to translate this query into teradata?

Thank you very much!
Now, it is OK.

Thanks^_^
Winnie