Note

1.sql 去重复

DELETE from table1
where Id not in
(select * from(SELECT Id from table1 GROUP BY lasttime) t)

2.int型日期转换成datetime

cast(CONCAT(SUBSTR(ldate,1,4),'-',SUBSTR(ldate,5,2),'-',SUBSTR(ldate,7,2)) as DateTime)

 

posted @ 2015-04-22 13:57  Chaoa  阅读(57)  评论(0编辑  收藏  举报