Quantcast
Channel: Teradata Forums - Database
Viewing all articles
Browse latest Browse all 14773

Experiencing Challenges with TimeStamp in Teradata - forum topic by mmbratz

$
0
0

I am Extraxting Data from Teradata using the two scripts below which are supposedly the same but Syntax 1) returns less than 2), i need to understand what could be causing the variance or if it's both the correct way to do it or not. please assist!
1. SELECT COUNT(1)
FROM
PROD_BI.BI_IT_TAXPAYER_H_KEY
WHERE DATE_START_HIST<= Cast(Current_date as Date) - (Extract (Day from Current_date))
AND DATE_END_HIST > Cast(Current_date as Date) - (Extract (Day from Current_date))
 
Results: 23 028 717
 
AND
 
2. SELECT COUNT(1)
FROM PROD_BI.BI_IT_TAXPAYER_H_KEY
WHERE DATE_START_HIST <='2013-06-30 00:00:00.000'
AND DATE_END_HIST > '2013-06-30 00:00:00.000'
 
Results: 23 028 732

Forums: 

Viewing all articles
Browse latest Browse all 14773

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>