on 07-18-2012 10:39 PM
Hi All,
Could any one let us know how to insert null value to the date filed of an JDBC table.
Thanks in advance.
harsha
Are you looking for sample insert SQL for inserting null values? Something as below
INSERT INTO TEST (COL1, COL2) VALUES (1, NULL);
example: col2 is date.
You can also search online for passing insert values in SP. The sample example as below
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
My scenario is proxy to Jdbc receiver using Stored procedures.
In this itried to insert a null value in to a date filed but ended with errors.(Used graphical mapping)
For then same scenario if i passed value to the date field its working fine.
Could any one let us know is there any way to insert null value in to the jdbc table using stored procedures.
Thanks in advance
harsha
Hi,
In the JDBC receiver channel there is an option for the same: "Interpretation of Empty String Values"
From SAP help:
Specify how empty text fields are to be handled.
In the case of INSERT and UPDATE statements, empty fields are handled like NULL fields (do not exist) and are not inserted in the database.
In the case of INSERT and UPDATE statements, empty texts are inserted in the columns.
Thanks
Amit Srivastava
Hi,
If i am not wrong you want to insert Null value in the DB table if the date field is empty or does not exist. So, this option will insert "Null" value in the DB table.
So, use MapWithDefault in the mapping for the date field and check "Interpretation of empty string" option in the JDBC channel and give a try.
Thanks
Amit Srivastava
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.