skip to main |
skip to sidebar
Easy SQL split field
Here is an easy way to split a field into a left and right side use a particular splitting char (in this case a space)
SELECT
LEFT(TaskNo, charindex( ' ', TaskNo) ) as TheLeftSide,
RIGHT(TaskNo, len(TaskNo) - charindex( ' ', TaskNo) ) as
TheRightSide
FROM sometablename
No comments:
Post a Comment