SELECT.....
(v1.PCG like 'n0%'
or
v1.PCG like 'n1%'
or
v1.PCG like 'n2%'
or
v1.PCG like 'n3%'
or
v1.PCG like 'n4%'
or
v1.PCG like 'n5%'
or v1.PCG='N63Af1')
and v1.PCG not like 'N2D%'
and v1.PCG not like 'N2E%'
and v1.PCG not like 'N2C%'
and v1.PCG not like 'N2F%'
and v1.PCG not like 'N2J%'
and v1.PCG not like 'N2K%'
and v1.PCG not like 'N2U%'
and v1.PCG not like 'N2GC%'
and v1.PCG not like 'N2GD%'
and v1.PCG not like 'N2GH%'
and v1.PCG not like 'N2GJ%'
and v1.PCG not like 'N2GK%'
) as 'Value Of PN Orders',
from........
我已经完成了我的代码,但我正在尝试找到一种更有效的方法来执行此操作,我看了看但找不到其他方法...有什么建议吗?
最佳答案
Like
支持字符类 so;
where v1.PCG like 'n[12345]%'
关于sql - 试图找到喜欢和不喜欢的替代方法 (SQL),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16940945/