[resolved] Talend Bug? Oracle nvl returns emtyp string, and Talend does not

One Star

[resolved] Talend Bug? Oracle nvl returns emtyp string, and Talend does not

In a TOracleInput, I am getting back null in talend, when I should be getting back an empty string:
The following is an illustration of source SQL for Oracle in a tOracleInput
"select nvl(null,"'" + "'" + ") as EmptyString from dual"
Oracle returns an empty string, and NOT null. Talend should receive it as an empty string.
Am I missing something?
Dave

Accepted Solutions
Community Manager

Re: [resolved] Talend Bug? Oracle nvl returns emtyp string, and Talend does not

Hello Dave
Please check your query statement if it is correct.
On tOracleInput,
"select nvl(null,'') as EmptyString from dual" ==>return null
"select nvl(null,' ') as EmptyString from dual" ==>there is a blank space bettween single quote, return empty string.
Best regards

shong
----------------------------------------------------------
Talend | Data Agility for Modern Business

All Replies
Community Manager

Re: [resolved] Talend Bug? Oracle nvl returns emtyp string, and Talend does not

Hello Dave
Please check your query statement if it is correct.
On tOracleInput,
"select nvl(null,'') as EmptyString from dual" ==>return null
"select nvl(null,' ') as EmptyString from dual" ==>there is a blank space bettween single quote, return empty string.
Best regards

shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: [resolved] Talend Bug? Oracle nvl returns emtyp string, and Talend does not

Hello Dave
Please check your query statement if it is correct.
On tOracleInput,
"select nvl(null,'') as EmptyString from dual" ==>return null
"select nvl(null,' ') as EmptyString from dual" ==>there is a blank space bettween single quote, return empty string.
Best regards

shong

shong,
With no space between the single quotes, oracle returns an empty string, not a null. See screenshot below.
The problem (seems like a talend bug to me), is that talend shows the retreived data as null, when I show it in a msgbox.
Dave
Community Manager

Re: [resolved] Talend Bug? Oracle nvl returns emtyp string, and Talend does not

Hello
With no space between the single quotes, oracle returns an empty string, not a null. See screenshot below.

If you execute it as query statement(press F9 in Oracle sql developer), you will see it return null on result viewer. Anyway, you could get null without space bettween single quote or empty string with space bettween single quote in Talend.
Best regards

shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: [resolved] Talend Bug? Oracle nvl returns emtyp string, and Talend does not

Hello
With no space between the single quotes, oracle returns an empty string, not a null. See screenshot below.

If you execute it as query statement(press F9 in Oracle sql developer), you will see it return null on result viewer. Anyway, you could get null without space bettween single quote or empty string with space bettween single quote in Talend.
Best regards

shong

oops! Sorry - my bad. Thanks shong.
Dave