1

I have checked on web I got one example like

select convert_from(decode(encode('abc', 'base64'), 'base64'), 'UTF8');

now I want to decode my string so I am trying the same with below mentioned

select convert_from(decode(encode((select resumestring from submitapplications where id=1030), 'base64'), 'base64'), 'UTF8');

ERROR:  function encode(text, unknown) does not exist

LINE 1: select convert_from(decode(encode((select resumestring from ...

1
  • Do you want actually decode or encode? What kind of data does your table contain? Add the table definition and some sample data to the question Commented Feb 17, 2016 at 10:51

1 Answer 1

3
SELECT
    convert_from(
        decode(
            encode(
                convert_to(
                    (
                        select resumestring from submitapplications where id=1030
                    ),
                    'UTF-8'
                ),
                'base64'
            ),
            'base64'
        ),
        'UTF8'
    )
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.