0

I have the following table1

ID | TAX
---+--------------------
 1 | 99.999.999.9-999.999
 2 | 99.999.999.9.999.999
 3 | 99.999.999.9,999,999
 4 | 99.999999-9-999-999

I want to create a new column TEMP_TAX, but this column is only a temporary query, expected output results (NOT PUNCTUATION [,.-]):

ID | TAX                  | TEMP_TAX
---+----------------------+-----------------
 1 | 99.999.999.9-999.999 | 999999999999999
 2 | 99.999.999.9.999.999 | 999999999999999
 3 | 99.999.999.9,999,999 | 999999999999999
 4 | 99.999999-9-999-999  | 999999999999999

Can someone help with the query? Thank you before.

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
mae
  • 47
  • 5

1 Answers1

2
select id, tax, replace(replace(replace(tax, '.', ''), '-', ''), ',', '')
from mytable
Neeraj Agarwal
  • 1,059
  • 6
  • 5