T-SQL trim   (and other non-alphanumeric characters)

后端 未结 5 1581
谎友^
谎友^ 2020-11-30 09:11

We have some input data that sometimes appears with   characters on the end.

The data comes in from the source system as varchar() and our attempts to cast a

5条回答
  •  暗喜
    暗喜 (楼主)
    2020-11-30 09:52

    How is the table being populated? While it is possible to scrub this in sql a better approach would be to change the column type to int and scrub the data before it's loaded into the database (SSIS). Is this an option?

提交回复
热议问题