A Microsoft extension to the ANSI SQL language that includes procedural programming, local variables, and various support functions.
It depends on the definition of the data format. When it is fixed
value := customer-name comma-sign customer-address
comma-sign := ASCII 44
customer-address := literal
customer-name := literal without comma-sign
then it is a simple:
DECLARE @test TABLE (
col VARCHAR(256)
);
INSERT INTO @test
VALUES ( 'William Faulkner, 10, Smith Street, London,' ) ,
( 'George West, 10, John street, George West, Texas' );
SELECT T.col ,
LTRIM(SUBSTRING(T.col, CHARINDEX(',', T.col) + 1, 1024))
FROM @test T;
In all real world scenarios I've seen, when people relied on data format by convention, there was in the end data violating the convention.
So splitting data is possible, but you cannot be sure that you have done it correctly.
Depending on the use-case and process behind, you need an instance to verify the results.
And any other possible format than the above will increase the risk of parsing problems and a bad data quality in the end.