null values not getting updated" and "null values are being dropped

Database
The Teradata Database channel includes discussions around advanced Teradata features such as high-performance parallel database technology, the optimizer, mixed workload management solutions, and other related technologies.
Enthusiast

null values not getting updated" and "null values are being dropped

HI I have a query where null values are  not getting updated. Is there any rule that null values are not get update in Update statement ?

Null values are gettig dropped

 

please let me know .

here goes my update statement

 

Update A
from 
 FACT_DC   A ,    
(
SELECT  distinct
DATE   ,
a2,
a3  ,
a4,
a5,
pma_in ,
a6 ,
a7 ,
a8 ,
a9 ,

a10,
a11
a12
 SUM( TELLER out  ) AS TELLER out,
SUM (TELLER IN ) AS TELLER IN
FROM BACCT_FACT_1        
      GROUP BY 1,2,3,  4,5  ,6 ,7,8,9,10,11,12,13
  )   B
SET   TTELLER IN=B.TELLER IN,
            TELLER out =B.TELLER out
            WHERE 
A.date = B.date
 AND A.a2        = B.a2
 AND A.a3           = B.a3
        AND A.a4=  b.a4
 AND A.pma_in          = B.pma_in
 AND A.a5           = B.a5
 AND A.a6          = B.a6
 AND A.a7           = B.a7
 AND A.a8               = B.a8
 AND A.a9              = B.a9
 AND A.a10 = B.a10
 AND A.a11 = B.a11
 AND A.DATE = 201708

1 REPLY
Senior Apprentice

Re: Null values are not updating in update statment

Hi,

 

Can you define "null values not getting updated" and "null values are being dropped" in your context?

 

If the null values are in one or more of the columns that you join on then those values will never join. A NULL value in a column will never match a NULL value in another column. Please see my reply to your previous post here: https://community.teradata.com/t5/Database/How-null-values-will-work-in-update-statement/td-p/76722

 

Cheers,

Dave

 

 

Ward Analytics Ltd - information in motion
www: http://www.ward-analytics.com