Tuesday, 25 December 2012

Subtract and Concatinate date and time from a table and get the date and update in table


UPDATE lock_TKT
SET  TOTAL_TIME=To_Days(CONCAT(`fix_date`,' ',`fix_time`))-To_Days(CONCAT(`Tran_date`,' ',`lock_time`))
where ticket_no in ( select ticket from excelupload)

No comments:

Post a Comment