Quantcast
Channel: Teradata Forums - Database
Viewing all articles
Browse latest Browse all 14773

Different text formating to decimal - response (1) by dnoeth

$
0
0

Leading/trailing blanks/zeroes and thousand separators are never a problem, but the wrong (i.e. european) separators.
What's your TD release?
When you have the oTRANSLATE function installed it's easy to switch european to US before the cast:

CAST(oTRANSLATE(:OPS_EU1, ',.', '.,') AS DECIMAL(10,3)) 

Or if you're shure the fractional part has always the correct number of digits you might simply remove all blanks and separators:

CAST(oTRANSLATE (:OPS_EU1, ' ,.', '') AS DEC(13,3)) / 1000

 
Dieter


Viewing all articles
Browse latest Browse all 14773

Trending Articles