Eine Einführung in

SQL

Finding a substring in a string

MS 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 MS SQL Server
CHARINDEX gives the position, see also PATINDEX