Using SQL Scripts, I need to validate Comma Separate value. How should i validate the String Variable ?
Validation should be both Right / Left Trim for each value and there should not be any special characters such as Comma or Period for the last value.
create table #test
insert into #test values
select * from #test
You can update your table to fix "offensive" values.
update #test set col = substring(col, 1, len(col) - 1) where col not like '%[0-9]'
This will remove last character where value doesn't end by a digit.