Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Variance Report Pre-post Not Matching Posting

prog_0927

Programmer
Jan 3, 2022
46
US
Progression 7.9.310

We ran a variance report of anything < .01 or > .01 prior to posting the tags from yesterday's count. The posting amount was off by a significant amount versus the variance report. We didn't see but one duplicate tag that we can account for, any thoughts on this? We are unsure of why that didn't match or come closer and now trying to find the source. Any help/best practices, or advice would be appreciated.
 
Figured it out! I did a SQL pull on the TAGHST table and found duplicates there that caused the issue Here is the SQL query if anyone is interested (change to your count date and your location as needed in script below; this pulls any rows with a count of > 1 which will need looked at/recounted/potentially reversed:

;
WITH B AS
(select t.item_no, t.count_qty, l.std_cost, t.count_qty * l.std_cost as 'total',
ROW_NUMBER() OVER(PARTITION BY t.item_no order by t.item_no) as 'row_no' from IMTAGHST_SQL t left
outer join iminvloc_sql l on t.item_no = l.item_no where count_dt = '20241223' and l.loc = 'loc1')
SELECT * FROM B where row_no > 1
 

Part and Inventory Search

Sponsor

Back
Top