Vishwamurthy
New User
Joined: 11 Mar 2008 Posts: 57 Location: India
|
|
|
|
I am trying to insert a new row into a DB2 table.
I want one of the columns to be a NULL. I am trying to do that through a REXX executable.
Code: |
"INSERT INTO AGENT VALUES ( ?, ?, ?, ?)"
|
and then
I am populating variables AGENTIDA, DOBA, ADDRESSA to some values
CONTACTA=NULL inserts a 'NULL' in that column
CONTACTA="" inserts a row, but the column is not a NULL
Code: |
"EXECSQL EXECUTE S2 USING :AGENTIDA, :DOBA, :ADDRESSA, :CONTACTA"
|
If I try doing
Code: |
"INSERT INTO AGENT (AGENTID, DOB, ADDRESS) VALUES (?, ?, ?)"
|
and then
Code: |
"EXECSQL EXECUTE S2 USING :AGENTIDA, :DOBA, :ADDRESSA"
|
I get an error in insert
Code: |
SQLCODE -518
SQLSTATE 07003
|
Can anyone guide me in this regard?
Thanks in advance. |
|