I have a split function that splits a single column which contains "dbo.Table1.Column1" delimited by a period
I need to update 3 columns named Schema, TableName and ColumnName in each row. I'm struggling with the TSQL code.
This works well to perform the split but I don't know how to update the table columns with the split values:
DECLARE @DelimitedString NVARCHAR(128)
SET @DelimitedString = 'dbo.MyTable.MyColumn'
select Data FROM dbo.fnSplitString(@DelimitedString, '.') where Id = 1
select Data FROM dbo.fnSplitString(@DelimitedString, '.') where Id = 2
select Data FROM dbo.fnSplitString(@DelimitedString, '.') where Id = 3
Thanks for any tips.