Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 9052

Re: behaviour of default with load table command in IQ 16.

$
0
0

Sorry, I'm not aware of such option in Load statement, however using intermediate table let's say testa_tmp, could be an alternative.

Load all data into testa_tmp, then copy via insert/select in a way to apply Default to null values:

 


1- insert into testa (a, c) select a, c from testa_tmp S where S.b = null ;

So for all rows inserted,  b column value will be 'Def' because not specified.


2- insert into testa select * from testa_tmp S where S.b <> null ;

All rows inserted have non-null b value .


3- Drop table testa_tmp

 

 


Viewing all articles
Browse latest Browse all 9052

Trending Articles