You can translate the question and the replies:

Denodo Equivalent for Oracle/SQL function "TRANSLATE"

We need to replace any found letters (abcdefg...ABDCDE...) with 9's. This is done in Oracle with TRANSLATE, how can we do this in Denodo: ``` (TRANSLATE(( ENTRPT.F_LEADTIME_HIST.AVAILABILITY ),'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ;.- ','9999999999999999999999999999999999999999999999999999')) BETWEEN 13 AND 18 THEN '12-18 wks' ```
06-12-2021 11:56:52 -0500

2 Answers

I forgot you can use the REGEXP for this, and just use [A-Za-z] for what I need. ``` SELECT REGEXP('A95','[A-Za-z]', '99999') AS result FROM Dual(); ```
06-12-2021 14:35:48 -0500
Hi, For this scenario, I have also used the REGEXP function to replace the letters(A-Z,a-z) into 9’s like the example mentioned below: SELECT REGEXP(<column_name>,'[A-Za-z]', '9') AS result FROM <view_name>; By executing the above query, I was able to replace the alphabets with 9’s. For more information, you can take a look at the [REGEXP]( in the Virtual DataPort VQL Guide. Hope this helps!!
Denodo Team
07-12-2021 07:34:21 -0500
You must sign in to add an answer. If you do not have an account, you can register here