Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
列値の左パディング ゼロを削除する方法。列のデータ型は Unicode 文字列 [DT_WSTR] です。私を助けてください。
Replace(Ltrim(Replace(column1, '0', ' ')), ' ', '0')
これにより先行ゼロが削除されますが、文字列に空白が含まれていないことを確認してください。このコードはそのような場合には機能しません
それを DT_I4 にキャストしてから DT_WSTR に戻します。これにより、先頭のゼロが取り除かれます。