Encode64 in Oracle?

2

How do I do an encode64 to a query?

This is my query

select id_solicitud from sol_solicitud where id_solicitud=506

My query brings me 506, but I need the query to return me with encode64, that is to say that it appears like this

NTA2

Thank you very much !!

    
asked by Devin Stiven Zapata Areiza 25.07.2018 в 14:32
source

1 answer

2

Try the following function:

Syntax :

UTL_ENCODE.BASE64_ENCODE (
   r  IN RAW) 
RETURN RAW;

Parameter r : The RAW value to be encoded.

RAW : Contains the coded base of 64.

Your case:

UTL_ENCODE.BASE64_ENCODE (
    select id_solicitud from sol_solicitud where id_solicitud=506 IN RAW) 
    RETURN RAW;

More info: link

    
answered by 25.07.2018 / 15:09
source