chandra sekhar n
chandra sekhar n

Reputation: 11

Regular expression not working Sybase ASE 16.0

I am trying to retrieve IDs from a table in Sybase ASE 16.0

The query has to return IDs starting with AB or BC. Example AB0001 AB0002 BC0001 BC0002

The regular expression in my query is not working

Select * from T1 where id like '(AB|BC)%'

The above query is not working. Can someone suggest the correct regex statement that works in ASE.

Upvotes: 1

Views: 287

Answers (1)

SeanH
SeanH

Reputation: 566

ASE 16 doesn't support this kind of regex like. Please try below SQL:

select * from T1 where id like 'AB%' or col2 like 'BC%'

Upvotes: 4

Related Questions