Skip to content

Commit

Permalink
Merge pull request #330 from erikdarlingdata/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
erikdarlingdata authored Dec 6, 2023
2 parents 757a5de + e1850a7 commit 432d2ad
Show file tree
Hide file tree
Showing 7 changed files with 1,843 additions and 790 deletions.
18 changes: 9 additions & 9 deletions String Functions/get_numbers.sql
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,15 @@ SELECT
x.x,
1
)
FROM x AS x
WHERE SUBSTRING
(
@string COLLATE Latin1_General_100_BIN2,
x.x,
1
) LIKE N'[0-9]'
ORDER BY x.x
FOR XML PATH(N''), TYPE
FROM x AS x
WHERE SUBSTRING
(
@string COLLATE Latin1_General_100_BIN2,
x.x,
1
) LIKE N'[0-9]'
ORDER BY x.x
FOR XML PATH(N''), TYPE
).value('./text()[1]', 'nvarchar(max)')
) AS numbers_only;
GO
Expand Down
18 changes: 9 additions & 9 deletions String Functions/strip_characters.sql
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,15 @@ SELECT
x.x,
1
)
FROM x AS x
WHERE SUBSTRING
(
@string COLLATE Latin1_General_100_BIN2,
x.x,
1
) NOT LIKE N'[' + @match_expression + ']'
ORDER BY x.x
FOR XML PATH(N''), TYPE
FROM x AS x
WHERE SUBSTRING
(
@string COLLATE Latin1_General_100_BIN2,
x.x,
1
) NOT LIKE N'[' + @match_expression + ']'
ORDER BY x.x
FOR XML PATH(N''), TYPE
).value('./text()[1]', 'nvarchar(max)')
) AS strip_characters;
GO
Expand Down
Loading

0 comments on commit 432d2ad

Please sign in to comment.