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
Sybase 12.5: Compare Table Load Performace between Dev and Prod box
Subtotals in MS Access query
benefits and "issues" when using exchange cached mode? How would you tackle those issues?
How can I limit Remote Desktop connections to the Administrator account only?
disable print screen function
Sql server agent service doesn't start
total of user accounts in active directory
winword.exe has generated errors...while trying to print
Open attachments in Outlook 2007 without being read-only
Access Query - how to manipulate date in format yyyymm