Insert NULL String/Integer into Oracle DB Column

One Star

Insert NULL String/Integer into Oracle DB Column

Hi,
If I have a variable (String/Integer) that can be 'null' and I try to insert it into a DB column (whith the tOracleRow component) which accepts NULL values, I get the error: 'ORA-01722: invalid number' when that variable is null.
However, I can insert directly NULL value in that column...
What's the problem?
Thanks
Five Stars

Re: Insert NULL String/Integer into Oracle DB Column

"If I have a variable (String/Integer) that can be 'null' "
If the DB Type is numeric, you must pass a number of a numeric type with a null pointer.
You can't pass a null String pointer or the string "null" if this is what you're suggesting.
One Star

Re: Insert NULL String/Integer into Oracle DB Column

for null, are you trying to put null manually? If so, it considers it as a string "null"
Please elaborate to help you better.
One Star

Re: Insert NULL String/Integer into Oracle DB Column

The column type is 'NUMBER'.
I get the values I want to insert from a CSV file: they are Strings or Integers. But I don't know what values will be Null, so I just want that, if they are, the Null could be inserted in the table.
One Star

Re: Insert NULL String/Integer into Oracle DB Column

Can u explicitly change the input to a number and try inserting it?
I think there is a string value present in the input field which is not getting converted to a number
If the input is blank or null, make it null else explicitly convert it to a number

Calling Talend Open Studio Users

The first 100 community members completing the Open Studio survey win a $10 gift voucher.

Start the survey

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog

How Media Organizations Achieved Success with Data Integration

Learn how media organizations have achieved success with Data Integration

Read

Tutorial

Introduction to Talend Open Studio for Data Integration.

Watch