• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 486
  • Last Modified:

SQL Query Returning First Letter

I need an SQL query that distinctly returns the first letter of each value in the column.

Here's an example:

Column A has the following values:  baseball, football, soccer, swimming
The new query would return the following:  b, f, s

I'm using Oracle 10G.
0
lcor
Asked:
lcor
1 Solution
 
sdstuberCommented:
select distinct substr(A,1,1) from your_table
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now