3

我有以下查询,

select * from process where name like 'abc';

现在名称可以是 abc 或 ABC 或 Abc 或 aBc ,任意组合,

我不能使用上层和下层函数,因为这个查询被传递到另一个不支持这些函数的系统,

此外,不支持整理,即我不能做,例如。

select * from process where name like 'abc' COLLATE SQL_Latin1_General_CP1_CI_AS

有没有办法在不使用上下函数的情况下使这个查询不区分大小写?

4

2 回答 2

1

如果我们不能使用:

  1. 下或上
  2. 评估不区分大小写的整理

可能结合所有结果:

select * from process where name in ('abc', 'aBc', 'ABc', 'aBC', 'abC', 'AbC', 'aBC', 'ABC')
于 2012-07-03T11:40:02.617 回答
0

这应该工作:

select * from process where name rlike '[aA][bB][cC]'
于 2016-04-28T15:00:15.357 回答