![]() |
|
Archives of the TeradataForumMessage Posted: Thu, 10 Apr 2008 @ 14:07:42 GMT
You could do some variation of this however SQL is probably not best place for this kind of error trapping IMHO.
create table test
( c1 decimal(10,3));
insert into test (0.00);
insert into test (122.33);
select case when c1 <> 0 then cast(c1 as float) else cast(c1+
999999999999.9999 as smallint) end
from test;
| ||||||||||||||||||||||||||||||||||||||||||||||||
| | ||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||
|
| ||||||||||||||||||||||||||||||||||||||||||||||||
| Copyright 2016 - All Rights Reserved | ||||||||||||||||||||||||||||||||||||||||||||||||
| Last Modified: 15 Jun 2023 | ||||||||||||||||||||||||||||||||||||||||||||||||