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

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
Tornquist
Participant
Posts: 22
Joined: Tue May 28, 2013 2:35 pm

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

Post 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!
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

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

Post 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.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply