I have 2 tables. TabA and TabAdup
both table structure is same. I executed a select query (with some condition) on TabA & fetched the values to local variables.
Then I ran insert query to TabAdup with values from local variables.
These are carried out in a for loop for all the values
Here there are 8 column have structure as NULL ALLOWED.(NOT NULL - is not there)
During insertion for any of these 8 columns when their value is NULL, insert is not happening properly.
In both the table definition, I have not given default value but still it is inserted with 0 when the original value is null. I want exact insertion if null then that column should have null in TabAdup.
I cannot have so many insert statements by removing the null field from insert statement because the combinations will come 2 power 8 = 1024 insert statements.
Please clarify/resolve.
Code has to be in PRO C/ C Sharp
both table structure is same. I executed a select query (with some condition) on TabA & fetched the values to local variables.
Then I ran insert query to TabAdup with values from local variables.
These are carried out in a for loop for all the values
Here there are 8 column have structure as NULL ALLOWED.(NOT NULL - is not there)
During insertion for any of these 8 columns when their value is NULL, insert is not happening properly.
In both the table definition, I have not given default value but still it is inserted with 0 when the original value is null. I want exact insertion if null then that column should have null in TabAdup.
I cannot have so many insert statements by removing the null field from insert statement because the combinations will come 2 power 8 = 1024 insert statements.
Please clarify/resolve.
Code has to be in PRO C/ C Sharp
Comment