•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the MySQL section within the Web Development category of DaniWeb, a massive community of 430,118 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,338 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our MySQL advertiser: Programming Forums
Views: 970 | Replies: 4 | Solved
![]() |
•
•
Join Date: Nov 2006
Posts: 14
Reputation:
Rep Power: 2
Solved Threads: 0
Hi friends,
I think the MySql is not case sensitive for selecting values. for example I am having a table called dept,
Id | Depart
1 | BTECH
11 | it
12 | ibt
2 | BE
21 | cse
22 | ece
Now i want to select the capital dept values from dept, but not using the id. how can i achieve it. I tried the following as query ..
select upper(depart) from dept;
but its just converting all values of dept table to capital. that is
it shows as follows
BTECH
IT
IBT
BE
CSE
ECE.
So how can i filter the lower case values to just display the upper case values to look like the following result
Depart
BTECH
BE
please help me if u know the solution.
I think the MySql is not case sensitive for selecting values. for example I am having a table called dept,
Id | Depart
1 | BTECH
11 | it
12 | ibt
2 | BE
21 | cse
22 | ece
Now i want to select the capital dept values from dept, but not using the id. how can i achieve it. I tried the following as query ..
select upper(depart) from dept;
but its just converting all values of dept table to capital. that is
it shows as follows
BTECH
IT
IBT
BE
CSE
ECE.
So how can i filter the lower case values to just display the upper case values to look like the following result
Depart
BTECH
BE
please help me if u know the solution.
Last edited by kutta_vin : Jun 17th, 2008 at 12:29 pm.
•
•
Join Date: Jun 2008
Location: Phoenix, AZ
Posts: 812
Reputation:
Rep Power: 2
Solved Threads: 64
try this
CONCAT( UPPER( SUBSTRING( colname, 1, 1 ) ) , LOWER( SUBSTRING( colname, 2 ) ) )
•
•
Join Date: Nov 2006
Posts: 14
Reputation:
Rep Power: 2
Solved Threads: 0
•
•
•
•
try this
CONCAT( UPPER( SUBSTRING( colname, 1, 1 ) ) , LOWER( SUBSTRING( colname, 2 ) ) )
Hello R0bb0b,
Your query doesn't works for me.
![]() |
•
•
•
•
•
•
•
•
DaniWeb MySQL Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Other Threads in the MySQL Forum
- Previous Thread: Right Forum?
- Next Thread: MySQL Administrator


Linear Mode