SQL Server 中是这样写的:select IsNew = (Case when (sysdate-Field_Date1 <= 3 and F_Time is  null) then 1 Else 0 End) from T_Infos

解决方案 »

  1.   

    select (Case when (sysdate-Field_Date1 <= 3 and F_Time is null) then 1 Else 0 End) IsNew
    from T_Infos
      

  2.   

    select decode(substr(sysdate-Field_Date1-3,1,1),'-',1,0) into VARIABLE from T_Infos;供参考
      

  3.   

    notselect xxx=col from table
    have to
    select col into xxx from table8.0以上版本支持case
      

  4.   

    不是INTO,而是 AS.
    或者写成:
    select decode(SIGN(sysdate-Field_Date1-3),-1,1,0) IsNew from T_Infos
      

  5.   

    sysdate-Field_Date1 <= 3这样写不行吗?
    decode是作什么的?