Finding a substring in a string

SQL Server
Here we extract the first word of a country name. INSTR gives this position of one string within another, we use this and substring to pick out the first few characters.

Specific to SQL Server
CHARINDEX gives the position, see also PATINDEX

Related links: