你用:select * from table1 where isdate(mydate)<>1查出非法的时间数据

解决方案 »

  1.   

    用:insert into sales,…… date select mydate,…… from table1 where isdate(mydate)=1导入真确的数据
      

  2.   

    ISDATE
    Determines whether an input expression is a valid date.Syntax
    ISDATE ( expression ) Arguments
    expressionIs an expression to be validated as a date. expression is any expression that returns a varchar data type. Return Types
    intRes
    ISDATE returns 1 if the input expression is a valid date; otherwise, it returns 0. This table shows the return values for a selection of examples.
      

  3.   

    insert into sales,…… date select case when isdate(mydate)=1 then mydate else null end,…… from table1