my97

my97

http://www.my97.net/demo/index.htm

https://blog.csdn.net/xiangff_csdn/article/details/78688506

 

 

SELECT * FROM (
    SELECT ROW_NUMBER() OVER ( ORDER BY p.CreateTime desc ) AS RowNumber,
    COUNT(1) OVER() AS Total,
     p.OrderId, p.Id,ui.RealName,p.Point,ui.UId,ui.UserPhone,pui.UserType,
case when p.UId=p.UserId then '自己' else '上级' end as dx,

case when ui.RealName is null then ui.NickName else  ui.RealName end as mingcheng,

case when pui.RealName is null then pui.NickName else  pui.RealName end as shangji,


pui.RealName as Uname,pui.UserPhone as Uphone,
p.Status,p.CreateTime,p.ModifyTime,o.OrderNum
from UserInfo ui
left join PointRebate p on ui.Id=p.UserId
left join UserInfo pui on p.UId=pui.Id
left join dbo.Orders o on o.id=p.OrderId
where 1=1 and p.OrderId is not null
) AS t
WHERE RowNumber BETWEEN {0} AND {1}
ORDER BY t.RowNumber

 

and  (isnull(ui.NickName ,'')+isnull(ui.RealName,'')) like '%{0}%'//多个字段模糊查询

 

posted on 2018-07-20 16:52 Smile向前 阅读( ...) 评论( ...) 编辑 收藏
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值