H
hetian_1982
Unregistered / Unconfirmed
GUEST, unregistred user!
declare @Region varchar(10)
declare @copNO varchar(15)
set @copNO='ALL'
set @Region='PRC'
select distinct Style as [1 Item Code],color as [2 color],Descr1 as [3 size],' ' as [4 Inseam]
from vewdwcop where cop= case when @copNO='ALL' then cop else @copNO end and
case when @Region='PRC' then
Region in ('GZ','SH','BJ','WS','FR')
else Region=@Region end
and qty1<>0 and len(rtrim(cop))>8
我想问一下 where 条件那里
case when @Region='PRC' then
Region in ('GZ','SH','BJ','WS','FR')
else Region=@Region end
怎么错了??? 我是想要一个动态的查询条件,如果当@Region='PRC'的时候,就用 Region in ('GZ','SH','BJ','WS','FR') 这个条件,其它的话就用其所长Region=@Region
declare @copNO varchar(15)
set @copNO='ALL'
set @Region='PRC'
select distinct Style as [1 Item Code],color as [2 color],Descr1 as [3 size],' ' as [4 Inseam]
from vewdwcop where cop= case when @copNO='ALL' then cop else @copNO end and
case when @Region='PRC' then
Region in ('GZ','SH','BJ','WS','FR')
else Region=@Region end
and qty1<>0 and len(rtrim(cop))>8
我想问一下 where 条件那里
case when @Region='PRC' then
Region in ('GZ','SH','BJ','WS','FR')
else Region=@Region end
怎么错了??? 我是想要一个动态的查询条件,如果当@Region='PRC'的时候,就用 Region in ('GZ','SH','BJ','WS','FR') 这个条件,其它的话就用其所长Region=@Region