By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,628 Members | 1,880 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,628 IT Pros & Developers. It's quick & easy.

How to display string with combination of uppercase and lowercase letters?

P: 1
Hi, I want a query to display a string with the combination of both uppercase and lower letters.
The first 3 characters should be in uppercase and the remaining characters should be in lowercase.

ex: TURner, MARtin, MILler,...

*I want query w.r.t Microsoft SQL Server 2008.

Thanks in advance.
Nov 17 '13 #1
Share this Question
Share on Google+
2 Replies


ck9663
Expert 2.5K+
P: 2,878
You should do this in your front-end.

Good Luck!!!

~~ CK
Nov 18 '13 #2

P: 9
CREATE TABLE [mytable] (A CHAR(10))

INSERT INTO mytable VALUES('MARTIN')
INSERT INTO mytable VALUES('MILLER')
INSERT INTO mytable VALUES('TURNER')

SELECT UPPER(SUBSTRING(A,1,3)) + LOWER(SUBSTRING(A,4,LEN(A)))
FROM mytable
Dec 9 '13 #3

Post your reply

Sign in to post your reply or Sign up for a free account.