cancel
Showing results for 
Search instead for 
Did you mean: 

How to insert a NULL value in SQL using JDBC Adapter

Former Member
0 Kudos

Hi All,

I have a File -> JDBC scenario.

In the File and in the SQL table I have a column called "MR_DATE" that needs to be mapped

I have to do the following:

If MR_DATE is NOT equal to "00000000"

then pass MR_DATE to SQL table

else

set the MR_DATE column in the table as NULL.

Please suggest

regards,

Piyush

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

I solved this by using the "If" block.

It does not create the target node if date is 00000000.

Former Member
0 Kudos

Hi Piyush,

In the receiver JDBC adapter select the option Interpretation of Empty String Values as NULL.

Pass date as empty, it will be interpreted as NULL by adapter and inserted in database.

Regards,

Gautam Purohit

Former Member
0 Kudos

What about if you want to insert empty string values for other fields (besides the nulls for that particular field)?