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