question

erlokeshsharma08 avatar image
erlokeshsharma08 asked

* value in sql table column

Hi Has anybody encountered a '*' value inside a sql table column. I think I did some research on this some time ago when i faced a similar issue, however cant remember on top of my head. ![alt text][1] [1]: /storage/temp/2974-untitled.png
sql-server-2012
untitled.png (16.0 KiB)
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Tom Staab avatar image
Tom Staab answered
This happens when converting from an integer to a character string that isn't long enough. This is explained in the MSDN article for CONVERT in the section titled "Truncating and Rounding Results".
[ https://msdn.microsoft.com/en-us/library/ms187928.aspx][1] [1]: https://msdn.microsoft.com/en-us/library/ms187928.aspx
2 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Here is learning from this....who soever reads this ....if you want to extract substring from an integer column try using a substring/right/left function instead of limiting the int column type to a column with string datatype that has length lesser than the int column.
1 Like 1 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.