Foxtable(狐表)用户栏目专家坐堂 → [求助],如何找出来每个月比上一月度缺少的客户名称的记录?


  共有5268人关注过本帖平板打印复制链接

主题:[求助],如何找出来每个月比上一月度缺少的客户名称的记录?

帅哥哟,离线,有人找我吗?
don
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:八尾狐 帖子:1812 积分:12993 威望:0 精华:14 注册:2008/10/11 18:07:00
  发帖心情 Post By:2013/6/26 16:16:00 [只看该作者]

Dim t1 As Table = Tables("窗口1_Table1")
Dim sql,s1,s2 As String
s1=Format(Date.Today.AddMonths(-1),"yyyyMM")
s2=Format(Date.Today,"yyyyMM")
sql ="Select * from{表A} where 日期 ='" & s1 & "'"
Dim v1 As List(of String) = DataTables("表A").GetUniqueValues("日期 = '" & s2 & "'","客户")

t1.StopRedraw
t1.FILL(SQL,"",True)
For Each r As Row In t1.Rows
    If v1.Contains(r("客户")) Then
        r("客户") = "Del"
    End If
Next
t1.DataTable.DeleteFor("客户 = 'Del'")
t1.ResumeRedraw

 回到顶部
总数 14 1 2 下一页