Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have attached Job where after writing into database table, I am simply trying to update datetime format for certain columns using tDbRow. When I run below query in MySQL DB directly, it updates cell value whereever it can find datetime format in specified format. Now I have few cells which doesnt contain datetime format. MySQL simply shows the error code for those without updating any value there and still updates the rest. With same query, tDBRow simply throws an error without updating rest of the cell values where the where condition is satisfied. Why? Is there any solution to this?
Please note, column type is VARCHAR and not Date and I cannot update it to Date as this column doesnt always contain datetime value.
Query: UPDATE QRDA1_Auto_Analyst_Test_Script SET Tag2 = DATE_FORMAT(STR_TO_DATE(Tag2, '%m/%d/%y'),'%Y%m%d%H%i%s') WHERE Tag2 <> 'UNK'
AND STR_TO_DATE(Tag2, '%m/%d/%y')
@Janki Bhatt ,what error are you getting?
Thanks,
Manohar
I am seeing below error; one of the column has cell value "Refill" and same column but other few cell has date value. Type of this column is VARCHAR
Incorrect datetime value: 'Refill' for function str_to_time