标签云

微信群

扫码加入我们

WeChat QR Code

I have the values in column 01 which i want to convert as values in Column 02, removing all the zero's from end. Is there a way to do this in SQL server ? Column 01Column 02 20100000 20129050000 2905Thanks in anticipation.


This is likely string handling, but not numeric values.

2019年04月22日56分00秒

What is the datatype of those columns?

2019年04月22日56分00秒

Data type is integer having field length of 4, can stored values between -2,147,483,648 to 2,147,483,647

2019年04月22日56分00秒

Ivan, that's right. These are not numeric values

2019年04月22日56分00秒

...not numeric but integer?

2019年04月22日56分00秒

This is good. But I wonder why do you prefer to perform implicit casts to int instead of just casting to int?

2019年04月22日56分00秒

Lamak I am a bit lazy. And the real reason is +0 is shorter than CAST or CONVERT :)

2019年04月22日56分00秒

Lad.. It works for me ,, thanks for the quick help.. Hi5

2019年04月22日56分00秒

Nice work and Thanks for tip

2019年04月22日56分00秒