Home Forums SQL Server 2008 T-SQL (SS2K8) When you convert int to varchar it returns *. Why? RE: When you convert int to varchar it returns *. Why?

  • You can read on the CAST and CONVERT page on the "Truncating and Rounding Results" section.

    Int, smallint and tinyint will return * when the result length is too short to display when converted to char or varchar. Other numeric to string conversions will return an error.

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2