Foxtable(狐表)用户栏目专家坐堂 → 降序怎么排?


  共有2359人关注过本帖树形打印复制链接

主题:降序怎么排?

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


加好友 发短信
等级:超级版主 帖子:110629 积分:563047 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2018/10/7 12:01:00 [显示全部帖子]

降序代码加上DESC:
cmd.CommandText = "Sele ct top " & pagerows & " [_Identify], [_Identify] As 编号,[客户ID],[产品ID],[数量],[单价],[折扣] ,[数量]*[单价]*(1-[折扣]) as 金额 From {订单}  where "
If flt > "" Then
    cmd.CommandText &= iif(page=0,  "1=1 and " & flt &order by [_identify] DESC" ,  "[_Identify] not In (Sele ct top " & pagerows * page & " [_identify]  from {订单} where " & flt & " order by [_identify] DESC) And " & flt & " order by [_Identify] DESC")
Else
    cmd.CommandText &= iif(page=0,  "1=1 order by [_identify] DESC" ,  "[_Identify] not In (Sele ct top " & pagerows * page & " [_identify]  from {订单}  order by [_identify] DESC) order by [_Identify] DESC")
End If

 回到顶部