Subject | Sorting and filtering by UDF result |
---|---|
Author | Matt Bucknall |
Post date | 2006-03-10T11:36:20Z |
Hello,
I have written a UDF ( F_MATCHCOUNT(string, pattern) ) that returns
the number of times a given pattern string occurs in another string.
Is there a more efficient way I can perform the following query on
Firebird 1.5, where I only need to call the UDF once?
SELECT * FROM TABLE_NAME WHERE F_MATCHCOUNT(COLUMN_NAME, 'foo')>0
ORDER BY F_MATCHCOUNT(COLUMN_NAME, 'foo') DESC;
Thanks,
Matt.
I have written a UDF ( F_MATCHCOUNT(string, pattern) ) that returns
the number of times a given pattern string occurs in another string.
Is there a more efficient way I can perform the following query on
Firebird 1.5, where I only need to call the UDF once?
SELECT * FROM TABLE_NAME WHERE F_MATCHCOUNT(COLUMN_NAME, 'foo')>0
ORDER BY F_MATCHCOUNT(COLUMN_NAME, 'foo') DESC;
Thanks,
Matt.