I’m using Sybase 12.5.3, and want/need to do regex pattern matching.
The Sybase help says that regex features have been there since version 11, but I cannot get anything to work.
This document describes the REGEXP and SIMILAR TO search conditions. I have tried both of these with no success, on various tables.
As an example:
SELECT *
FROM REPORTS
WHERE name regexp '.*'
…gives me an error:
Incorrect syntax near ‘regexp’.
The only search results for that error are related to MS-SQL.
I’ve tried various things, including using REGEXP_LIKE and SIMILAR TO, but I get the same sort of error, as if that word is not understood. Am I missing something? The column I’m comparing contains strings.
I can’t find any option to enable/disable these features either, and the actual string I’m supplying has no bearing on it.
I’m using DBArtisan 8.7.5 if that’s relevant.
Your link goes to a Sybase Anywhere manual but the 12.5.3 you are using? Well that looks like a Sybase ASE version number. Totally different products – I don’t think ASE supported Regex till ASE 15. If you are using ASE you’ll need to find a different way to do this.