You can convert exact and approximate numeric data to a character type. If the new type is too short to accommodate the entire string, an insufficient space error is generated. For example, the following conversion attempts to store a five-character string in a one-character type:
select convert(char(1), 12.34)
It fails because the char datatype is limited to one character, and the numeric 12.34 requires five characters for the conversion to be successful.
Copyright © 2005. Sybase Inc. All rights reserved. |