Solved

Getting first letter of String in SQL

Posted on 2011-02-26
4
920 Views
Last Modified: 2012-05-11
Hi,

How to get the first letter of the whole string through SQL query. For example, my string is
"Welcome to Expert exchange". Now i have to get the first letter of the string like WTEE

Please let me know the way

Thanks
0
Comment
4 Comments
 
LVL 23

Accepted Solution

by:
Rajkumar Gs earned 125 total points
ID: 34987212
0
 
LVL 3

Expert Comment

by:sergiobg57
ID: 34987225
SELECT SUBSTR(column,1,1) 
FROM table 
WHERE column = codition;

Open in new window

0
 
LVL 73

Assisted Solution

by:sdstuber
sdstuber earned 125 total points
ID: 34987407
upper(regexp_replace(s, '((^| )([^ ]))|.', '\3'))
0
 

Author Closing Comment

by:Suriyaraj_Sudalaiappan
ID: 34990572
GOOD ONE
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Cursors in Oracle: A cursor is used to process individual rows returned by database system for a query. In oracle every SQL statement executed by the oracle server has a private area. This area contains information about the SQL statement and the…
I remember the day when someone asked me to create a user for an application developement. The user should be able to create views and materialized views and, so, I used the following syntax: (CODE) This way, I guessed, I would ensure that use…
This video explains at a high level with the mandatory Oracle Memory processes are as well as touching on some of the more common optional ones.
This video shows how to recover a database from a user managed backup

816 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now