Page 1 of 1

Netezza Connector Insert Null into Non-Null (Use Default)

Posted: Thu Jul 11, 2013 9:04 am
by Tornquist
I have a table in the database I'm working with that has a huge number of not null columns. All of these columns have a default value coded into the ddl. The job I'm working with needs to be replicated quickly for 60 other tables, so I really don't want to manually type in all of the default values.

I need a way to insert a row with a null value for a not null column so that the database uses the default value.

How would I go about doing this? The null values are handled properly when I interact with the database outside of datastage.

Thanks!

Re: Netezza Connector Insert Null into Non-Null (Use Default

Posted: Thu Jul 11, 2013 3:58 pm
by ray.wurlod
Tornquist wrote:I need a way to insert a row with a null value for a not null column so that the database uses the default value.
This will not be accepted. The default value is only used when no value at all is supplied - that is, the column name does not appear in the columns list and no value for it appears in the values list of an INSERT statement.