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

c++ - What's the differece between of link to a dynamic file and as a input object? -

javascript - Feed FileReader from server side files -

Android Unit Testing / Mockito: android.location.Location not mocked -