|
|
今天遇到有点BT的问题,因为程序用三种数据库(oralce, db2, sqlserver), 重用oracle的别名写法的sql sentence在sqlserver机子上会报错,去掉别名就可以.
delete from EXCEPTION_MESSAGE_RETENTION emr whereconvert(varchar(7), emr.MESSAGE_TIME, 120)<convert(varchar(7), dateadd(month, -1, getdate()), 120)error: Incorrect syntax near 'em'.update(update EXCEPTION_MESSAGE em set em.message_subject = "BT")也会出一样的错.但 select(select emr.MESSAGE_TIME from EXCEPTION_MESSAGE_RETENTION emr)不会出错. |
|