Subject Some SUBSTRING extra features?
Author majstoru
Hi,

I have a small problem with firebird SQL when I'm using SUBSTRING
statemen.
I have generator's named GEN_NAMEGEN_ID, when I need to return set of
all generators I make a SQL statement on a system table
RDB$GENERATORS, so I neeg to have only a generator name with out GEN_
and _ID.

For Example:
Generator name is: GEN_NAMEGEN_ID
Result field value: NAMEGEN

If I use
SELECT SUBSTRING(RDB$GENERATOR_NAME FROM 5)
FROM RDB$GENERATORS
WHERE RDB$GENERATOR_NAME LIKE 'GEN_%'
I'll get all generators name with _ID after name, AND I need to trim
last 3 chars from end of a result word (_ID).

Is there any solution in Firebird SQL for my example?

Thanks in advace... ;-)