select WrkDate as "Operating Date",PrdCode as "Product Code",SuryoG as "Qty"
from AT007 Where KotCodeN = '0099' and WrkDate='2016-10-24'
UNION ALL
select TimeC as "Operating Date",PrdCode as "Product Code",Suryo as "Qty" from at015a Where KotCodes='0099'
and TimeC between '2016-10-24 00:00:01' and '2016-10-24 23:59:59'