Current location: Hot Scripts Forums » Programming Languages » PHP » MySQL Convert lowercase to Uppercase

MySQL Convert lowercase to Uppercase

Reply
  #1 (permalink)  
Old 10-04-05, 02:16 PM
Rattlecage Demon's Avatar
Rattlecage Demon Rattlecage Demon is offline
Newbie Coder
 
Join Date: Oct 2005
Posts: 27
Thanks: 0
Thanked 0 Times in 0 Posts
MySQL Convert lowercase to Uppercase

Need to convert lower case characters to uppercase characters with MySQL. Tried UCASE(columname) but returns error. Any suggestions??
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #2 (permalink)  
Old 10-04-05, 02:44 PM
digioz's Avatar
digioz digioz is offline
Community Leader
 
Join Date: Oct 2003
Location: Chicago, IL
Posts: 2,072
Thanks: 2
Thanked 3 Times in 3 Posts
The following syntax works fine for me:

Code:
SELECT UCASE(columnName) FROM `table_name`
Is that how you used it? Another option would be to convert string to upper case using the PHP built-in "strtoupper()" function. Here is more on that:

http://us3.php.net/strtoupper
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #3 (permalink)  
Old 10-04-05, 04:40 PM
NeverMind's Avatar
NeverMind NeverMind is offline
Community VIP
 
Join Date: Aug 2003
Location: K.S.A
Posts: 2,251
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by Rattlecage Demon
Need to convert lower case characters to uppercase characters with MySQL. Tried UCASE(columname) but returns error. Any suggestions??
probably you had a syntax error somewhere else in the query.. or maybe your MySQL version doesn't have this function?!
try using UPPER() instead
__________________
We don't need a reason to help people - Zidane [FF9]
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 2 (0 members and 2 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Any free tools to convert a mssql DB dump to mysql? Trel Database 4 12-12-09 08:10 AM
first word uppercase and yellow text with following words lowercase and blue text? Tim Mousel PHP 2 07-16-05 04:53 PM
Convert excel to mysql perl_boy Perl 1 04-29-05 10:41 AM
Convert Access to Mysql Dr.Jamescook PHP 14 04-28-05 10:59 AM
How to convert an Exchel sheet into MySQL DB Ole Nygaard PHP 1 08-27-03 09:10 AM


All times are GMT -5. The time now is 09:51 PM.
vBulletin® Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.