22,210
社区成员
发帖
与我相关
我的任务
分享
declare @idppbh nvarchar(10)
set @idppbh ='1234'
select a.products_id,a.sgg,a.sdw,a.products_price,a.products_erp,
c.products_id,c.products_name,d.idppbh,d.sppmc
from osc_products a,osc_products_description c,brand d
where a.products_id =c.products_id and a.products_id
in (select b.products_id from brand_area_product b where b.idppbh= d.idppbh
and b.idppbh = isnull(@idppbh,b.idppbh) -- 这样
and c.products_name like '%". $pro_name ."%'
declare @idppbh nvarchar(10)
set @idppbh ='1234'
select a.products_id,a.sgg,a.sdw,a.products_price,a.products_erp,
c.products_id,c.products_name,d.idppbh,d.sppmc
from osc_products a,osc_products_description c,brand d
where a.products_id =c.products_id and a.products_id
in (select b.products_id from brand_area_product b where b.idppbh= d.idppbh
and b.idppbh = isnull(@idppbh '. $brand . '
and c.products_name like '%". $pro_name ."%'