teradata - Comparing two fileds in select command -
i trying select records transaction_table tr_amount = instrument_number using following code
select * transaction_table abs(tr_amount) = cast(instrument_number integer) however there rows in table instrument_number alphanumeric instead of numeric data. there way skip alphanumeric instances in instrument_number field in command.
switch to_number, returns null bad data:
select * transaction_table abs(tr_amount) = to_number(instrument_number) td15.10 implements trycast:
select * transaction_table abs(tr_amount) = try_cast(instrument_number integer)
Comments
Post a Comment