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

Popular posts from this blog

Load Balancing in Bluemix using custom domain and DNS SRV records -

oracle - pls-00402 alias required in select list of cursor to avoid duplicate column names -

python - Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>] error -