Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Thu, 01 Nov 2007 @ 12:30:38 GMT


     
  <Prev Next>   <<First <Prev Next> Last>>  


Subj:   Re: Problem with handling null values for Partition
 
From:   Michael Larkins

Hello Etienne:

I believe if you do a bit more research regarding PPI you would find that the partitioning column can be null. If it is null,(which means it is not truly part of a primary key (not nullable)) Teradata can handle it. You need to specify one of 2 things: 1. UNKNOWN partition - where nulls go or 2. use CASE_N where columname is null. Yours uses the UNKNOWN. Although I have not specifically tried this scenario, I would be tempted to believe the developers have it covered if they allow an UNKOWN partition.

As you have seen already, do not use the coalesce on it so that Teradata can find it in the UNKNOWN partition.

As for the hashing, it is not a problem. If you run the query below, you will see that the hashing function does just fine with or without a null because basically, it is ignored.

     sel hashrow(1,null), hashrow(1), hashrow(3,null), hashrow(3,null),
     hashrow(1,3,null), hashrow(1,3), hashrow(null,null)

Hope this helps,

Michael Larkins
Certified Teradata Master
Certified Teradata SQL Instructor



     
  <Prev Next>   <<First <Prev Next> Last>>  
 
 
 
 
 
 
 
 
  
  Top Home Privacy Feedback  
 
 
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 15 Jun 2023