Skip to content
Advertisement

Tag: numeric

Convert character to number, like +00005 to 5

We have the fixed format data and it has the number with plus/minus sign, like +00005 or -00005. We’d like to convert it to number but Redshift seems not to allow implicit conversion. So, I temporarily use to_number(replace(<numbercolumn>, ‘+’, ”),’99999′) But I guess there should be more better solutions. Anyone know more smart way, your advice would be highly appreciated.

Extract number between two characters in Hive SQL

The query below outputs 1642575.0. But I only want 1642575 (just the number without the decimal and the zero following it). The number of delimited values in the field varies. The only constant is that there’s always only one number with a decimal. I was trying to write a regexp function to extract the number between ” and .. How

Casting the Bigint number Returns NULL

I need o convert a integer value to the highest data type in hive as my value is of 25 digits NULL value will be returned for the above select stmnt; I am very well aware that the supplied number is greater than the largest number of Bigint. But we are getting such values upon which i have to calculate

Extract first numeric part of field

I have a database (Postgres 7.4) field for address Example Data The queries I get all but I don’t want 123 main street I get the results I want My question is how do I just match the numeric part of the address? Answer Returns 1 or more digits from the start of the string. Leave out the anchor ^

Advertisement