执行SQL的语句是通用的吧,不知道convert能不能pgAdmin中使用呢?我用了出错~同样的语句在sql server中没问题

解决方案 »

  1.   

     group by "DATENAME"(hour,"COUNTTIME"),"GATEID"
    象这个语句也不能运行,
    ERROR:  column "hour" does not exist
    但是在sql server中没有错误
      

  2.   


    多了去了。t_girl=# select date_part('hour',now());
     date_part
    -----------
            13
    (1 笔资料列)t_girl=# select extract(hour from now());
     date_part
    -----------
            13
    (1 笔资料列)
    PS:convert 函数在任何可以执行SQL语句的环境下都可以用。
    比如:select convert('I love PostgreSQL','UTF8','GBK');
    仔细看看手册!!!