I am just trying to add the letter A to the beginning of the results Im bring back and I keep getting this message. Query Failed. 3535 a character string failed conversion to a numeric value Thanks for any help.
select
a.area_cd as CO_Area
, 'A' + a.area_cd
from intDDt.DIXX a
2 Answers
+ is a numeric operator in Standard SQL and Teradata and not a string concat (as in MS SQL Server). You need to use || instead:
'A' || TRIM(a.area_cd)
The TRIM results in an automatic typecast.
please try this,
select
a.area_cd as CO_Area
, ('A' + CAST(a.area_cd AS VARCHAR))
from intDDt.DIXX a