|
|
Archives of the TeradataForum
Message Posted: Wed, 02 Nov 2016 @ 10:43:34 GMT
Subj: | | Re: Change VARCHAR(16) to BIGINT |
|
From: | | Dieter Noeth |
Roopalini Bakthavachalam wrote
| I need to change a VARCHAR(16) field in a table to BIGINT. However it has alpha-numeric characters. Is it possible to change the datatype
to BIGINT? Right now, I am getting 'Bad character in format or data' error. | |
You can use TO_NUMBER which doesn't fail but returns NULL for non-numeric strings. Of course this might return decimal values, too, then you
must decide how to deal with that.
Dieter
| |