Convert varchar(50) to Date Format 'yyyy-mm-dd' in teradata? -
I have a column I want to insert data from another table in that column as While selecting the table I put it Error found INSERT failed. 2665: Invalid date Can anyone help me in this casting? The this is an example of the date stored in varchar (50) Regions: 2014-04-03 thanks in advance date
format yyyy-mm-dd while making
varchar (50)
TEMP_TABLES.FACT (CUSTOMER_ACCOUNT_ID, LOB_START_DATE,) put in the SEL CUSTOMER_ACCOUNT_ID, LOB_START_DATE as I.start_date, #LOGIN I join JOURNEY_TABLE.DOTCOM_DIM d1 on I.PAGES = d1.PAGE_DESC left
If it would be helpful if a query that should allow you to identify rows with invalid dates:
< Pre> select * t1 outer leave Received #login cast = on Tlkstart_date (cast (as 'YYYY-MM -DD') joining date format t2.calendar_date Sys_calendarkcalendar T2 four (10)) where t2.calendar_date Null
A line will have invalid dates returning from this query.
Comments
Post a Comment