|
下面是SQLServer的一条SQL语句,在ACCESS不支持呀,正确的应该怎么写呀?急呀!指点一下吧!谢谢啦!
select case
when Neighbor1 like '%11-166-1%' then 1
when Neighbor2 like '%11-166-1%' then 2
when Neighbor3 like '%11-166-1%' then 3
when Neighbor4 like '%11-166-1%' then 4
when Neighbor5 like '%11-166-1%' then 5
when Neighbor6 like '%11-166-1%' then 6
when Neighbor7 like '%11-166-1%' then 7
when Neighbor8 like '%11-166-1%' then 8
else 9 end
as Priority,
Carrier1
+case Carrier2 when '' then '' else ','+Carrier2 end
+case Carrier3 when '' then '' else ','+Carrier3 end
+case Carrier4 when '' then '' else ','+Carrier4 end
+case Carrier5 when '' then '' else ','+Carrier5 end
+case Carrier6 when '' then '' else ','+Carrier6 end
+case Carrier7 when '' then '' else ','+Carrier7 end
+case Carrier8 when '' then '' else ','+Carrier8 end
as Carrier_List
from CM_Info |
|