zbb1990

导航

hehe

with wares as
        (
         SELECT distinct a.Wid as wid,
         a.Wname as wareName,
         a.warejia as warePrice,
         row_number() OVER(ORDER BY a.wid asc) AS rownumss
         FROM ware a WITH (NOLOCK),GYS_Ware (nolock) gw
         ,SplitStr(#sku#) as t1
         ,SplitStr(#caigouRange#) as t2
         ,Splitint(#caiGouYuan#) as p
         ,SplitStr(#thirdCategoryRange#) as t4
         ,SplitStr(#wpidList#) as t5
      len(a.wid)<9
         a.wid = t1.value
         (
         a.caigou = p.value
         or
         a.wid in (select wid from waremaster with (nolock)  where usertype=2 and userid= (select op_code from admin(nolock) where id= p.value))
         )
         a.WPid = t4.value
         a.WPid = #smallType#
         a.WPid = t5.value
      a.Wyn = 1  and  a.wfacturer=gw.brand         and  gw.gysid = #suppId#
         a.wstate = #wstate#
         a.Wfacturer = #pinPai#
         a.shangjia=#sjName#
         a.wname like '%' + #goodsName# + '%'
         gw.gysid = #suppId#
         group by   a.Wid, a.Wname,a.warejia
        )
        select wid,wareName,warePrice,rownums
        from wares with (nolock)

 

 

 

http://www.tmall.com/go/act/sale/yuemogou.php?spm=3.1000473.295813.31.GkzG2T&ad_id=&am_id=1301047866016600e9b4&cm_id=&pm_id=

posted on 2013-08-29 20:08  zbb1990  阅读(233)  评论(0编辑  收藏  举报