Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Issue with regexp_replace in sql query

Hi,

 

I am trying to run this query putting in tDBInput component. But I am getting error as Invalid character constant.

From my study, I understood that Talend doesn't accept regexp_replace. If yes, do we have any other alternate solution to do this.

SELECT '"'|| regexp_replace(to_char(sysdate,'dd-MON-yy'), '["]','""') ||'"' from dual

 

 

Thanks in advance,

Meghana.

Labels (2)
1 Solution

Accepted Solutions
fdenis
Master
Master

use this into Query field:
"SELECT '\"'|| regexp_replace(to_char(sysdate,'dd-MON-yy'), '[\"]','\"\"') ||'\"' from dual"

View solution in original post

5 Replies
fdenis
Master
Master

here your regexp is apply on sql side.
Anonymous
Not applicable
Author

Sorry, I did not get u. 

This query works fine in my sql developer. But I want to use this in Talend which I am unable to do. I hope u got my issue.

 

Thanks,

Meghana.

fdenis
Master
Master

use this into Query field:
"SELECT '\"'|| regexp_replace(to_char(sysdate,'dd-MON-yy'), '[\"]','\"\"') ||'\"' from dual"
manodwhb
Champion II
Champion II

@MeghanaKottala,i will suggest you to get the data using below query in tJavaRow use regular expression to replace.

 

 

SELECT to_char(sysdate,'dd-MON-yy') from dual

 

 

Anonymous
Not applicable
Author

Thank you. It works.

 

Thanks,

Meghana.