Hello, I am trying to write an INSERT query for DB2 using the Query D

Hello,

I am trying to write an INSERT query for DB2 using the Query Database Node that in some cases sets the value of VARCHAR field to NULL while in other cases it inserts an actual value.

The INSERT query is of the form "INSERT INTO <table> (..., <VARCHAR FIELD>", ...) VALUES (..., ac!VarcharField, ...)"

How can i write the expression for the value of the parameter ac!VarcharField so that it sets the Field to have a NULL value, depending on a condition, in the database?

Generally, in DB2, you set the field to NULL using the expression "CAST(NULL AS VARCHAR(10))".

Thanks for the help....

OriginalPostID-121205

OriginalPostID-121205

  Discussion posts and replies are publicly visible

Parents Reply Children
No Data