Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Data Decode not working as expected Postgres

Im using the below update statement to decode a value in column .

 

update table set col =substring(decode(decode(col,'escape')::text,'hex')::varchar,1,25)

 

it works fine when i run it in pgadmin/dbeaver or any client tools.. but the same is not working when running via talend tpostgresrow component.

 

In Client tools:

sample values: select substring(decode(decode('2342354354','escape')::text,'hex')::varchar,1,25)

Op: "#B5CT"

 

in talend 

op : "\x2342354354"

 

Labels (2)
1 Reply
fdenis
Master
Master

23 = #
54 = T
from hex to acsii
so tis' working but the driver used to connect postgres do not translate response as acsii.
check your driver/db configuration or use TEXT(x) data type or convert result to ascii or utf8 char.
good luck