dvayne Posted January 14, 2008 Share Posted January 14, 2008 how to display students who five-letter first names? how to display lastnames in uppercase letters and the firstnames in lowercase of all the students? how to display all students lastnames and its corresponding length how to display the id number of students with their addresses. the first character of address should be converted to uppercase? Quote Link to comment Share on other sites More sharing options...
GingerRobot Posted January 14, 2008 Share Posted January 14, 2008 See: http://dev.mysql.com/doc/refman/5.0/en/string-functions.html Quote Link to comment Share on other sites More sharing options...
fenway Posted January 14, 2008 Share Posted January 14, 2008 1) LENGTH(yourField) = 5 2) UPPER(lastName), LOWER(firstName) 3) I don't know your table structure 4) UPPER(LEFT(address,1)) Quote Link to comment Share on other sites More sharing options...
dvayne Posted January 19, 2008 Author Share Posted January 19, 2008 1) LENGTH(yourField) = 5 2) UPPER(lastName), LOWER(firstName) 3) I don't know your table structure 4) UPPER(LEFT(address,1)) UPPER(LEFT(address,1)) displays only the first character of the address. please help... Quote Link to comment Share on other sites More sharing options...
toplay Posted January 19, 2008 Share Posted January 19, 2008 # returns column value of -> a test as -> A test SELECT CONCAT(UPPER(LEFT(address,1)), SUBSTRING(address, 2)) AS address FROM table_name Learn by referring to the manual page for string functions: http://dev.mysql.com/doc/refman/5.0/en/string-functions.html Quote Link to comment Share on other sites More sharing options...
fenway Posted January 19, 2008 Share Posted January 19, 2008 I guess a hint isn't enough... Quote Link to comment Share on other sites More sharing options...
Barand Posted January 20, 2008 Share Posted January 20, 2008 You're right. He wants us to to his homework for him. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.