如何在一定长度后拆分字符串并更新不同列中的剩余字符串



列有值

'Allianz General Insurance Company (Malaysia) Berhad Test Test Test Test TesT'..

更新长度不超过70个字符的col1,并使用剩余字符更新col2。 前任:

**Col1**= 'Allianz General Insurance Company (Malaysia) Berhad'

**Col2**= 'Test Test Test Test TesT'
Select Case when LEN(ColumnName)>70 then SUBSTRING(ColumnName, 0, 70)   as Col1,Case when LEN(ColumnName)>70 then SUBSTRING(ColumnName, 71, 140)  end as Col2   :::::Value: Col1= 'Allianz General Insurance Company (Malaysia) Berhad'Col2='Test Test Test Test TesT'

最新更新