how to select a field with firstletter as capital and
remaining are small letters
Answers were Sorted based on User's Feedback
Answer / priya
SELECT * UPPER(SUBSTRING(<COLUMNNAME>,1,1))
+LOWER(SUBSTRING(<COLUMNNAME>,2,LEN(<COLUMNNAME>))) AS
<SOMENAME> FROM <TABLENAME>
| Is This Answer Correct ? | 10 Yes | 0 No |
Answer / radhika
SELECT Left(upper(<field_name>) , 1) + substring(lower
(<field_name>, 2, len
(<field_name>))
FROM <table_name>
| Is This Answer Correct ? | 6 Yes | 4 No |
Answer / dharmendra k dixit
Select Left(Upper((YourColumnName), 1) + Substring(Lower
(YourColumnName),2,Len(YourColumnName))AS UName
From YourTableName
| Is This Answer Correct ? | 3 Yes | 1 No |
Answer / velmurugan
Select UPper(Left(Company,1)) + Lower(Right(Company,Len
(Company)-1)) From Company
| Is This Answer Correct ? | 2 Yes | 1 No |
Answer / k.vanitha
CREATE TABLE Employee (NAME VARCHAR(20), SALARY int);
INSERT INTO employee VALUES (
'RAMESH',
9000);
INSERT INTO employee VALUES (
'RAJESH',
10000);
SELECT Left(upper(NAME),1) +
lower(substring(NAME,2,len(NAME))) FROM employee
| Is This Answer Correct ? | 3 Yes | 2 No |
Answer / bobby
select ascii('a')as a,ascii('z')as z
select ascii('A')as A,ascii('Z')as Z
select * from Table_name where (ascii(<COLUMNNAME>))
between 65 and 90)and
ascii(substring(<COLUMNNAME>,2,1)) between 97 and 122
| Is This Answer Correct ? | 2 Yes | 1 No |
Answer / amit shukla
select upper(left(h01_first_name,1))
+lower(substring(rtrim(h01_first_name),2,50)) as name from
<table name>
| Is This Answer Correct ? | 1 Yes | 0 No |
Answer / santosh kumar chhotaray
SELECT UPPER(SUBSTRING(<FieldName>,1,1))+LOWER(SUBSTRING(Name,2,LEN(<FieldName>))) AS
alliasename FROM tablename
Example
--------
SELECT UPPER(SUBSTRING(Name,1,1))+LOWER(SUBSTRING(Name,2,LEN(Name))) AS
name FROM tblInfo
| Is This Answer Correct ? | 1 Yes | 0 No |
Answer / vidit tyagi
SELECT Left(upper(<field_name>) , 1) + lower(substring
(<field_name>,2,len(<field_name>))) AS SomeName
FROM <table_name>
| Is This Answer Correct ? | 1 Yes | 1 No |
Answer / venakteswara rao
select upper(<colummn name>,1,1)+substring(lower(<column
name,2,len(<column name>))) as anyname from table name
| Is This Answer Correct ? | 0 Yes | 0 No |
What is the difference between writing data to mirrored drives versus raid5 drives
Explain about SQLOS?
I have to display ten columns values from diffrent ten tables. how many joins are require?
10 Answers CarrizalSoft Technologies, HCL,
What is database replicaion? What are the different types of replication you can set up in SQL Server?
5 Answers Aptech, HCL, Perpetual, SAIC,
How to apply filtering criteria at group level with the having clause in ms sql server?
You want to implement the one-to-one relationship while designing tables. How would you do it?
what r steps to we need to fallow b4 kill the process?
What is not null constraint?
Explain the difference between function and stored procedure?
Can binary strings be converted into numeric or float data types?
How retrieve field names from the table in SQL through JAVA code?
Find columns used in stored procedure?
Oracle (3259)
SQL Server (4518)
MS Access (429)
MySQL (1402)
Postgre (483)
Sybase (267)
DB Architecture (141)
DB Administration (291)
DB Development (113)
SQL PLSQL (3330)
MongoDB (502)
IBM Informix (50)
Neo4j (82)
InfluxDB (0)
Apache CouchDB (44)
Firebird (5)
Database Management (1411)
Databases AllOther (288)