Insert statement does not insert all records as shown by select statement
592323Oct 17 2007 — edited Oct 18 2007Hi
I have a problem where the insert statement is not inserting all the records as shown by the select statement.
For example,if i use the select statement like this to query the number of records
SELECT COUNT(*) FROM
(
SELECT * from tablename1
JOIN tablename2 a
ON condition
JOIN tablename2 b
ON condition AND condition
WHERE date >= (trunc(sysdate) - 10)
AND condition AND condition
AND condition
AND condition
GROUP BY columns)
It returns some 500 records and later when i use the insert statement like this
BEGIN
INSERT INTO tablename (columns)
(SELECT * from tablename1
JOIN tablename2 a
ON condition
JOIN tablename2 b
ON condition AND condition
WHERE date >= (trunc(sysdate) - 10)
AND condition AND condition
AND condition
AND condition
GROUP BY columns);
END;
This gives me less number of records than that are showing by the select statement.Can any one help me in this