oops this is an oracle special....my bad.
Here is a nice SQL function that I dug up on the net. It supposedly works, but doing it in PHP as brad suggested will be preferable imo, too.
1.
2.DELIMITER $$
3.
4.DROP FUNCTION IF EXISTS INITCAP$$
5.
6.CREATE FUNCTION INITCAP( param VARCHAR(255) )
7. RETURNS VARCHAR(255)
8. /*
9. * Author : Jens Blawatt
10. * Website : http://www.Blawatt.de
11. * Description : A MySQL equivalent to ORACLE’s initcap
12. */
13. BEGIN
14. DECLARE result VARCHAR(255) DEFAULT ”;
15. DECLARE tmp VARCHAR(255) DEFAULT ”;
16.
17. – endless repeat
18. WHILE 1 = 1 DO
19. – if it’s the end of the blank spearated string
20. IF INSTR(TRIM(param) , ‘ ‘) = 0 THEN
21. RETURN TRIM(CONCAT(result, UCASE(LEFT(param,1)),LOWER(SUBSTR(param,2))));
22. END IF;
23.
24. – split the first part to tmp
25. SET tmp = SUBSTR(param, 1, INSTR(param , ‘ ‘));
26.
27. – write first character in capital letter rest in small type
28. SET result = CONCAT(result, UCASE(LEFT(tmp,1)),LOWER(SUBSTR(tmp,2)));
29.
30. – remove splitted word from param string
31. SET param = SUBSTR(param, INSTR(param , ‘ ‘) + 1);
32. END WHILE;
33.END$$
34.
35.DELIMITER ;