Subject | need to get all the distinct first letters of entries in a column. |
---|---|
Author | rs_ravipati |
Post date | 2003-09-15T20:18:45Z |
Hi all,
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
Here's an example.
Name
-----
Abcd1
Abcd2
Bcde1
Cdef2
Cdef3
When I query this I need all the distinct first letters (That
is "A", "B" and "C").
regards,
raja.
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
Here's an example.
Name
-----
Abcd1
Abcd2
Bcde1
Cdef2
Cdef3
When I query this I need all the distinct first letters (That
is "A", "B" and "C").
regards,
raja.