like pattern matching

Adaptive Server allows you to treat square brackets individually in the like pattern-matching algorithm.

For example, matching a row with ‘[XX]’ in earlier versions of Adaptive Server required you to use:

select * from t1 where f1 like '[[]XX[]]'

However, you can also use:

select * from t1 where f1 like '[[]XX]'

Because of the need for full compatibility, this feature is available only in Adaptive Server version 15.7 and later by enabling the command:

sp_configure “enable functionality group”, 1

If you do not enable this feature, the behavior of like pattern-matching for square brackets is as in versions of Adaptive Server earlier than 15.7.

When you enable this feature:

The patterns that work when you enable this feature are:

Pattern

Matches

[[]

[

[]]

]

]

]

[[]XX]

[XX]

[[]XX[]]

[XX]