How can i do to convert numeric field (size: 10) to character field (size: 7) ..? Thx开发者_高级运维.
In MySQL it is possible to do something like this:
RIGHT(CAST(intvalue AS char), 7)
If the integer value is greater than 9,999,999
, you will lose the highest order digits, of course.
Depends on DBMS Oracle: TO_CHAR() , SQL Server str(). These are formating functions. For plain type conversion you can use cast
精彩评论