We're trying to extract sales from a Micros RES 4 database, in 15-minute periods, by revenue center.
More specifically, we are running this type of query against the database:
select count(d.chk_cnt) as count, sum(d.suppressed_rpt_ttl)as sum, tdtl.rvc_seq from trans_dtl as tdtl join dtl as d on tdtl.trans_seq = d.trans_seq join mi_dtl as mdtl on d.trans_seq = mdtl.trans_seq and d.dtl_seq = mdtl.dtl_seq join mi_def as mdef on mdtl.mi_seq = mdef.mi_seq where tdtl.type = 'S' and d.date_time >= '07/01/2012 09:00:00' and d.date_time < '07/01/2012 09:15:00' and tdtl.chk_seq not in ({3}) group by tdtl.rvc_seq;
Where the {3} is a list of any canceled checks, (type "C") during that time period.
Sometimes, the sales numbers match perfectly ... but more often than not, they don't quite match up with the gross sales reports (our numbers are low).
What are we missing?
--
Anthony
More specifically, we are running this type of query against the database:
select count(d.chk_cnt) as count, sum(d.suppressed_rpt_ttl)as sum, tdtl.rvc_seq from trans_dtl as tdtl join dtl as d on tdtl.trans_seq = d.trans_seq join mi_dtl as mdtl on d.trans_seq = mdtl.trans_seq and d.dtl_seq = mdtl.dtl_seq join mi_def as mdef on mdtl.mi_seq = mdef.mi_seq where tdtl.type = 'S' and d.date_time >= '07/01/2012 09:00:00' and d.date_time < '07/01/2012 09:15:00' and tdtl.chk_seq not in ({3}) group by tdtl.rvc_seq;
Where the {3} is a list of any canceled checks, (type "C") during that time period.
Sometimes, the sales numbers match perfectly ... but more often than not, they don't quite match up with the gross sales reports (our numbers are low).
What are we missing?
--
Anthony