在Access 中 怎么改 select isnull(max(right(id,4)),0)+1 as MaxID from  tb_rjz where left(ID,8)='+ FormatDateTime('yyyyMMdd',now)

解决方案 »

  1.   

    select isnull(max(right(id,4)),0)+1 as MaxID from  tb_rjz where left(ID,8)='+ FormatDateTime('yyyyMMdd',now)
    select iif(isnull(max(right(id,4))),1,max(right(id,4))+1) as maxid
    from tb_rjz where datedof;left(id,8)='+ )
      

  2.   

    select isnull(max(right(id,4)),0)+1 as MaxID from  tb_rjz where left(ID,8)='+ FormatDateTime('yyyyMMdd',now)---
    parameters yyyymmdd text(255);
    select iif(isnull(max(right(id,4))),1,max(right(id,4))+1) as maxid
    from tb_rjz where left(id,8)=yyyymmdd