Microsoft
Software
Hardware
Network
Question : Find first word in string
I have a field that could contain the following entries:
Table (Vendor)
VendorName
----------------
Fusion Limited
Fusion Ltd
Fusion, Ltd
Is it possible to have a select statement where it selects the first word in the string, before the space and before the comma? Is this possible?
Answer : Find first word in string
On reflection, mine can be simplified:
SELECT VendorName, LEFT(VendorName, PATINDEX('%[^a-z0-9]%', VendorName + '|') - 1) AS FirstWord
FROM SomeTable
Random Solutions
How to use viewctl.restriction to search through items' text body
BJEZPRN caused a divide error in module BJEZIMG.DLL
Generate Random Computer Name GSS 2.0
ASP.Net / AJAX - Page IsDirty
Insert into from csv file
Caracas Time Zone in WIndows Mobile 2003
Outlook Anywhere NTLM authentication
Folders will not redirect despite GPO settings originally working
Executing a SP with temp tables from another SP
MSDB Backup history Becoming Unmanageable