All Forums Database
tinamiller 1 post Joined 06/15
04 Jun 2015
Import Null Values

I have a Teradata table created for me to store massive amounts of imported data. At times I do not receive data for every field. I have 4 columns and I received a file with 835K distinct memberID numbers. The other 3 columns I have no data for. I am trying to do an
 
insert into mytable values (?,?,?,?);
Where the last ? is the data values I do have. The purpose is these memberID numbers will be used to query tables on the claims server to obtain the data for the 3 missing columns. My error is you have 4 parameters and 1 data and nothing will populate. If I put fake information in the 3 other columns, I get the same error message. Any advice?

dnoeth 4628 posts Joined 11/04
04 Jun 2015

insert into mytable (column4) values (?);

And don't forget to add COMPRESS to the remaining 3 columns.

Dieter

padhia 35 posts Joined 06/10
05 Jun 2015

Dieter,
 
Since NULLable column require a presence bit, are NULL values not compressed automatically? If not, what value is stored in the physical row when a column does have a NULL value?
 
Thanks

dnoeth 4628 posts Joined 11/04
05 Jun 2015

There's no automatic compression for NULLs. 
The stored value will be probably zero for numeric column, spaces for Chars and an empty string for Varchar.

Dieter

You must sign in to leave a comment.