Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 up to space

Author  Topic 

pmccann1
Posting Yak Master

107 Posts

Posted - 2007-01-30 : 06:01:22
is there a way of taking up to the first space in a string

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2007-01-30 : 06:03:41
LEFT(YourCol, CHARINDEX(' ', YourCol) - 1)


Peter Larsson
Helsingborg, Sweden
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2007-01-30 : 06:08:47
[code]SELECT dbo.fnParseString(-1, ' ', YourColumnNameHere)
FROM YourTableNameHere[/code]with the help of this function here
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=76033


Peter Larsson
Helsingborg, Sweden
Go to Top of Page
   

- Advertisement -