Cast the string to an int, then back into a nvarchar:
select CAST(CAST(substring('000422', 3, 4) as int) as nvarchar)
select CAST(CAST(substring('000422', 3, 4) as int) as nvarchar)
My professional notes on programming. Included in my notes are discussions on VB.NET, Microsoft Office, and some C#. I am just starting to learn about C# so as I learn more I will add more.
No comments:
Post a Comment