Mis-Matched number of rows inserted in a table
Hi Guys,
DB=10.2.0.4
OS = RHEL AS 4, 32 bit
The following query returns ..1940782 rows for 'YESTERDAY'.
SQL> Select COUNT(*) MessageCount, trunc(sysdate -1) DAY from DeviceTravelStatusHistory dtsh
where dtsh.locationtime >= to_date(to_char(sysdate-1, 'YYYY-MM-DD'), 'YYYY-MM-DD'); 2
MESSAGECOUNT DAY
------------ ---------
1940782 31-JUL-12
But, When I tried to insert these rows into another temporary table, it shows only - 17023 rows created. Here is the insert query im using..
insert /*+ APPEND */ into RPTDBA.MESSAGE_METRICS(DEVICEINSTANCEGUID,AVLMSGCOUNT,DAY)
Select dtsh.deviceinstanceguid, COUNT(*) MessageCount, trunc(sysdate -1) DAY from DeviceTravelStatusHistory dtsh
where dtsh.locationtime >= to_date(to_char(sysdate-1, 'YYYY-MM-DD'), 'YYYY-MM-DD') group by dtsh.deviceinstanceguid;
0