Archives of the TeradataForum
Message Posted: Tue, 15 Sep 2009 @ 14:14:53 GMT
Subj: | | Re: INTEGER to VARCHAR data conversion strange |
|
From: | | Roth, David |
Try making your varchar 11 in length. You are forgetting that integers have a sign +/- in addition to the 10 digits. People often miss this.
Same applies to smallint, etc
CREATE TABLE my_tab_ch
(cl1 VARCHAR(11) NOT NULL) ;
*** Table has been created.
*** Time was 1 sec. 9/15/2009 7:01:09 AM
INSERT INTO my_tab_ch SEL * FROM my_tab;
*** Insert completed. 3 row(s) added.
*** Time was 1 sec. 9/15/2009 7:01:09 AM
SELECT *
FROM my_tab_ch;
*** Query completed. 3 row(s) found. 1 field(s) returned.
*** Time was 1 sec. 9/15/2009 7:01:09 AM
cl1
-----------
14444
1
144
Dave
David W. Roth
Teradata Certified Master
TERADATA
|