add batch remove batch split batch comment selection show hidden batches hide batch highlight batch
db<>fiddle
donate feedback about
By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
create table t(Textcolumn varchar(50))
insert into t select 'SzhH'
insert into t select 'Tma'
insert into t select 'SzhH'
insert into t select 'CcMtp'
insert into t select 'XYZ'
5 rows affected
select Textcolumn,
IsNull(Left(TextColumn, p - 1), Textcolumn) Leftcol,
Right(TextColumn, Len(TextColumn) - p + 1) rightcol
from t
cross apply(values(Translate(Textcolumn collate SQL_Latin1_General_CP1_CS_AS, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', Replicate('*',26))))n(t)
cross apply(values(NullIf(Iif(Replace(n.t,'*','') = '', 0, CharIndex('*', n.t, 2)) ,0)))p(p)


Textcolumn Leftcol rightcol
SzhH Szh H
Tma Tma null
SzhH Szh H
CcMtp Cc Mtp
XYZ XYZ null