视频1 视频21 视频41 视频61 视频文章1 视频文章21 视频文章41 视频文章61 推荐1 推荐3 推荐5 推荐7 推荐9 推荐11 推荐13 推荐15 推荐17 推荐19 推荐21 推荐23 推荐25 推荐27 推荐29 推荐31 推荐33 推荐35 推荐37 推荐39 推荐41 推荐43 推荐45 推荐47 推荐49 关键词1 关键词101 关键词201 关键词301 关键词401 关键词501 关键词601 关键词701 关键词801 关键词901 关键词1001 关键词1101 关键词1201 关键词1301 关键词1401 关键词1501 关键词1601 关键词1701 关键词1801 关键词1901 视频扩展1 视频扩展6 视频扩展11 视频扩展16 文章1 文章201 文章401 文章601 文章801 文章1001 资讯1 资讯501 资讯1001 资讯1501 标签1 标签501 标签1001 关键词1 关键词501 关键词1001 关键词1501 专题2001
字段检索方案
2025-09-28 00:19:28 责编:小OO
文档
kkhcode>> ----定义变量,得到星期和日期

declare @day int

declare @weekday int

declare @koul dec(14,2) ---是否会员享受 是、否

declare @rq char(19)

set @day =0

set @weekday = 0

set @koul= 0

select @day = datepart(day,getdate())

select @weekday = case when datepart(weekday,getdate())-1 =0 then 7 else datepart(weekday,getdate())-1 end

----当星期天返回7

----检查当天是否有促销

select top 1 @koul= koul from cardrate where :mast.rq + :mast.ontime between srq+stime and erq+etime

and (yhweek=0 or yhweek=@weekday) and (yhday=0 or yhday=@day) and (cardid='ALL' or cardid=:value)

order by koul desc

select top 200 b.xingming as KKHNAME,a.kkhcode,a.isdj,a.cardid,a.gukeid,a.askpass,a.mima,a.is_shfzh,a.sxrq,

case when (@koul < 0 ) then 100.00

when (@koul = 0 ) then a.koul

when @koulelse a.koul end koul ,a.touzxe,a.ye,a.jifen

from ret_cuxiaoka a ,ret_gukezl b

where a.beactive='是' and (a.kkhcode like '%'+ :value +'%' or b.shouji like '%'+ :value +'%' ) and a.gukeid=b.gukeid

;

pihao>> select pihao2,pihao,shl-xsshl as hwshl from sphwph where spid=:spid and hw=:mast.hw and shl>0 order by shl,sxrq

;

KKHcode>> ----定义变量,得到星期和日期

select top 200 a.kkhcode ,b.xingming as KKHNAME ,a.jifen,a.ye

from ret_cuxiaoka a ,ret_gukezl b

where a.gukeid=b.gukeid and a.beactive='是' and ( a.kkhcode like :value or b.shouji = :value or b.Phone = :value or b.xingming = :value)

;

huowname>> select hw,hwbh,huowname from huoweizl where duifbsh = :fdbs

;

xshy>> select dzyid as xshyid ,dzycode ,dzyname as xshy from zhiydoc where beactive='是' and issp='是' and duifbsh = :fdbs and (dzycode like '%'+ :value +'%' or zjm like '%'+ :value +'%')

;下载本文

显示全文
专题