日期:2014-05-18  浏览次数:20502 次

奇了怪了?同样结构,不同结果
select   id   from   resumeSearcher   where   (001169081634015-lastsenddate)/(1000*60*60*24)> cycle

将数据类型   varchar   转换为   numeric   时出错。


select   id   from   jobSearcher   where   (001169081634015-lastsenddate)/(1000*60*60*24)> cycle

一切正常

jobSearcher   和resumeSearcher   这两个表里的lastsenddate字段完全相同,为什么查询时结果出入如此之大,两个表里的其他字段不完全相同,这是为什么?谢谢阿!真的从来没有遇到这种问题啊

------解决方案--------------------
lastsenddate两字段的值一样吗?
------解决方案--------------------
應該要進行數據類型的轉換, 樓主再好好檢查一下吧
------解决方案--------------------
char太长时隐性转换会出错的,cast为bigint应该行