Question:
In one of the column i am getting 2 values with a delimiter between it How to extract both the values
I have some thing like this Column TRN02 is 115679-5757
I need to take values before delimiter and after delimter into 2 separate columns again.
Can some one help me on this
You can use SUBSTRING to do this:
SELECT
SUBSTRING(TRN02, 0, CHARINDEX('-', TRN02)) AS [First]
SUBSTRING(TRN02, CHARINDEX('-', TRN02) + 1, LEN(TRN02)) AS [Second]
FROM TABLE