在informix当中得到昨天的日期
在sybase可以这样写select convert(char(8),dateadd(day,-1,getdate()),112)
但是在informix不行,有谁知道在informix怎么写吗?
谢谢了 有没有那位高手指点一下啊 一定在有from 表名啊:
select today-1,count(*)from 表名 group by 1 select distinct today - 1 from sometable;
注意表sometable一定要有数据,没有数据的话,返回空值。并且此表数据量最好比较少,有且只有一行数据则最好。 原帖由 xxyyy 于 2008-3-6 08:43 发表 http://bbs.chinaunix.net/images/common/back.gif
select distinct today - 1 from sometable;
注意表sometable一定要有数据,没有数据的话,返回空值。并且此表数据量最好比较少,有且只有一行数据则最好。
加上firts 1 就行了~~可以保证只有一条数据~~呵~ first 1这个语法 ids7是不支持的,ids9以上版本才支持。
而distinct或者unique都支持。
回复 #6 xxyyy 的帖子
楼上的说法欠妥,其实informix7.3以上的IDS只要你的esql版本达到9.0以上就可以支持first 1了,呵呵
页:
[1]