I need to count two tables and put the information into a third table. Table one contains part shipments(all sorted and scanned). Table tw contains the same information, but has been filtered for duplicates. Table a might have 2355 lines and 150 duplicate scans. Table two would then have 2205 lines. The third then contains the count of the first and second tables, plus the date the counts were made.
I use this code to add the count to the third table, insert INTO D0606_PTEAUDIT.DBO.TSPHONE (PSI_CNT_HLD_INT, psi_cnt_fil_int)
SELECT COUNT(*)AS PSI_CNT_HLD_INT, (select count(*) from tsphfil)as psi_cnt_fil_int
FROM TSPHHLD
where shp_dt = (08/28/2006).
I get the first number, but never the second. ANy ideas?
Thanx
Thank you,
Moe-King of the Village Idiots.
"When in trouble,
when in doubt;
Run in circles-
SCREAM & SHOUT!!"
Burma Shave
I use this code to add the count to the third table, insert INTO D0606_PTEAUDIT.DBO.TSPHONE (PSI_CNT_HLD_INT, psi_cnt_fil_int)
SELECT COUNT(*)AS PSI_CNT_HLD_INT, (select count(*) from tsphfil)as psi_cnt_fil_int
FROM TSPHHLD
where shp_dt = (08/28/2006).
I get the first number, but never the second. ANy ideas?
Thanx
Thank you,
![[king] [king] [king]](/data/assets/smilies/king.gif)
"When in trouble,
when in doubt;
Run in circles-
SCREAM & SHOUT!!"
Burma Shave