我们前一段发行过一批点卡,现在想把这些卡全部作废 总共5万张。截止日期是2008-12-31
需要怎么弄啊  最好详细点 谢谢啦!
   (也可以吧数据库的"Islocked"字段值o给改成1)

解决方案 »

  1.   

    update tb
      set islocked=1
    where 截止日期<='2008-12-31'
      

  2.   

    如果是连续的,可以按照主键来更新,
    否则,只有按照日期等标识栏位来更新
    update tb
      set islocked=1
      where cardId between @beginCardId and @EndCardId
      

  3.   

    update tb
      set islocked=1
    where datediff(dd,截止日期,cast('2008-12-31' as datetime))<= 0
      

  4.   


    同意3楼的做法.update tb
      set islocked=1
    where datediff(dd,截止日期,cast('2008-12-31' as datetime))<= 0
      

  5.   

    update tb 
      set islocked=1 
    where convert(varchar(10),截止日期,120) <='2008-12-31' 
      

  6.   

    update tb
      set islocked=1
    where 截止日期<='2008-12-31'
      

  7.   

    update table 
    set islocked =1
    where date=<2008-12-23