cast(JOB_TOTAL_DOCS as char) means:
cast(JOB_TOTAL_DOCS as char(1))
You need to specify the length yourself.
Quote:
|
Originally Posted by Yukke
I have a column that contains integers values for the number of documents.
select cast(cast(JOB_TOTAL_DOCS as char) as varchar(254)) docs...
When I try to cast the integer as char then to varchar.. the results would be concatenated into 1 character.
For example: if the original integer was 5691, after the cast the resulting varchar would be '5'. 753->'7', etc.
What am I doing wrong?
|