Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Fri, 27 Feb 2003 @ 21:10:25 GMT


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


Subj:   WINDDI, QUERYMAN and BTEQ generate different output for the same query
 
From:   Rohit Revo

When I run the following query thru Queryman and WinDDI i get results as expected, but when I run them in BTEQ, it gives a different answer. WHY?

SELECT DatabaseName,
CASE WHEN ((Sum(PeakPerm)/NULLIFZERO(Sum(MaxPerm))*100)(FORMAT
'999,999,999,999')) IS NULL
THEN 0
ELSE ((Sum(PeakPerm)/NULLIFZERO(Sum(MaxPerm))*100)(FORMAT
'999,999,999,999'))
END (TITLE 'Peak Perm//usage (%)'),
CASE WHEN ((Sum(CurrentPerm)/NULLIFZERO(Sum(MaxPerm))*100)(FORMAT
'999,999,999,999')) IS NULL
THEN 0
ELSE ((Sum(CurrentPerm)/NULLIFZERO(Sum(MaxPerm))*100)(FORMAT
'999,999,999,999'))
END (TITLE 'Current Perm//usage (%)')
FROM DBC.DiskSpace
GROUP BY 1
ORDER BY 1;

QUERYMAN OUTPUT

DatabaseName Peak Perm usage (%) Current Perm usage (%)
servo             182               33
Sam123            166               96
DBDB2              89               89
PPMODEL            83               81
CPSSUPER           82               82

BTEQ OUTPUT

DatabaseName Peak Perm usage (%)      Current Perm usage (%)
servo        1.82367992556408E 002    3.26491325167842E 0
Sam123       1.65525863416159E 002    9.60150023441163E 0
DBDB2        8.94829115454003E 001    8.94829115454003E 0
PPMODEL      8.30146969324843E 001    8.06025700730096E 0
CPSSSPER     8.15762519836425E 001    8.15217971801757E 0


     
  <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: 27 Dec 2016