Subject | RE : [firebird-support] need to get all the distinct first letters of entries in a column. |
---|---|
Author | Evelyne Girard |
Post date | 2003-09-15T20:59:06Z |
With Firebird 1.5 (I'm not sure about the order by clause with 1.0 ...
if necessary repeat the substr(...)), do :
SELECT DISTINCT SUBSTR(UPPER(Title),1,1) firstLetter FROM forms WHERE
Available ORDER BY 1
Of course, you'll have to declare the external function SUBSTR.
Evelyne
if necessary repeat the substr(...)), do :
SELECT DISTINCT SUBSTR(UPPER(Title),1,1) firstLetter FROM forms WHERE
Available ORDER BY 1
Of course, you'll have to declare the external function SUBSTR.
Evelyne
> I need to get a set of all distinct first letters in a column. We
> used to do it in SAPDB, but the same call fails in Firebird. Here's
> how we used to do it before. Let me know any modifications that might
> make this statement work in Firebird.
> SELECT DISTINCT LEFT(UPPER(Title),1) AS firstLetter FROM forms WHERE
> Available ORDER BY firstLetter