Jan 25, 2007 #1 RustyAfro Programmer Jan 12, 2005 332 US I have a simple cast statement CAST(aNumber AS VARCHAR(10)) that makes the number 111 to '111.' Can anyone tell me how to do the CAST properly so that the decimal is not included in the casted string?
I have a simple cast statement CAST(aNumber AS VARCHAR(10)) that makes the number 111 to '111.' Can anyone tell me how to do the CAST properly so that the decimal is not included in the casted string?
Jan 25, 2007 1 #2 blom0344 Technical User Mar 20, 2002 3,441 NL try: Code: REPLACE(CAST (aNumber AS VARCHAR(10)),'.','') OR: Code: CAST (INT(aNumber) AS VARCHAR(10)) Ties Blom Upvote 0 Downvote
try: Code: REPLACE(CAST (aNumber AS VARCHAR(10)),'.','') OR: Code: CAST (INT(aNumber) AS VARCHAR(10)) Ties Blom
Jan 26, 2007 Thread starter #3 RustyAfro Programmer Jan 12, 2005 332 US I used the second solution. Thanks Upvote 0 Downvote