Solved

Getting first letter of String in SQL

Posted on 2011-02-26
4
923 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 74

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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Configuring and using Oracle Database Gateway for ODBC Introduction First, a brief summary of what a Database Gateway is.  A Gateway is a set of driver agents and configurations that allow an Oracle database to communicate with other platforms…
From implementing a password expiration date, to datatype conversions and file export options, these are some useful settings I've found in Jasper Server.
This video shows how to Export data from an Oracle database using the Datapump Export Utility.  The corresponding Datapump Import utility is also discussed and demonstrated.
This video shows how to recover a database from a user managed backup

763 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