Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| tech-notes:sql [2022/12/21 14:00] – gerardorourke | tech-notes:sql [2022/12/21 14:06] (current) – [SUBSTRING and CHARINDEX] gerardorourke | ||
|---|---|---|---|
| Line 308: | Line 308: | ||
| *https:// | *https:// | ||
| + | |||
| + | ===== SUBSTRING and CHARINDEX ===== | ||
| + | |||
| + | Here we have a column ' | ||
| + | < | ||
| + | [FirstVariable] = SUBSTRING([myColumn], | ||
| + | [SecondVariable] = SUBSTRING([myColumn], | ||
| + | </ | ||
| + | |||
| + | CHARINDEX find the comma and lets you know the position it is in. | ||
| + | SUBSTRING uses start and end position to extract a substring. | ||