newbie69 Posted November 6, 2007 Share Posted November 6, 2007 Hi there, mysql 5.0 I have the following names in my table: --------speakers---- Danny Martin Pauala Preston Rulp Ryan Steven Sudhir -------- is there a sql statement that will return just the first occurrence of the Alphabet from the rows above. I would like it to return: --- d m p r s --- thanks alot guys Link to comment https://forums.phpfreaks.com/topic/76183-solved-help-with-a-query/ Share on other sites More sharing options...
~n[EO]n~ Posted November 6, 2007 Share Posted November 6, 2007 SELECT SUBSTRING (speakers , 1, 1 ) FROM table_name Link to comment https://forums.phpfreaks.com/topic/76183-solved-help-with-a-query/#findComment-385572 Share on other sites More sharing options...
newbie69 Posted November 6, 2007 Author Share Posted November 6, 2007 THANKS alot, this works! Link to comment https://forums.phpfreaks.com/topic/76183-solved-help-with-a-query/#findComment-385635 Share on other sites More sharing options...
fenway Posted November 6, 2007 Share Posted November 6, 2007 LEFT( speakers, 1 ) will also work. Link to comment https://forums.phpfreaks.com/topic/76183-solved-help-with-a-query/#findComment-385696 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.