I am wondering how can I get the first substring in SQL SERVER from a string using space as separator.
for example:
if I have this "word1 word2 word3", i want to get the first word which is "word1"
of course, i do not know the length of the first word, so i cannot use the substr function
Any ideas?
P.S.: i want to do this is a select query
Thanks!
This post has been edited by livium: 14 July 2011 - 12:32 AM

New Topic/Question
Reply



MultiQuote



|