Is there a way that I can structure a query for the following?
I have a table that contains all sorts of products [tblProducts]. That table holds all info relevant to that item as well as the date it was entered. Is there a way I could design a query to search through a date range (nothing specific, but like between now and 2 months ago) that will check an items price history, and if the price entered falls outside a certain range of others, alert the user?
Example:
The database has a long history of items 1, 2 and 3. Today you enter item 1 and its price. The query runs and checks that newly entered price against that items price between now to 2 months ago. It finds that the newly entered price falls outside a threshold increase (say 10%) and alerts the user. Whereas items 2 and 3 fall within accepted thresholds and dont raise anything to the user.
More or less I thought it would nice to have some kind of system in place to catch possible incorrect pricing and to bring it to the users attention for a potential review.
I see the query having the criteria part number like that entered to narrow it down to that specific item, but don't know if the rest could be done.
I have a table that contains all sorts of products [tblProducts]. That table holds all info relevant to that item as well as the date it was entered. Is there a way I could design a query to search through a date range (nothing specific, but like between now and 2 months ago) that will check an items price history, and if the price entered falls outside a certain range of others, alert the user?
Example:
The database has a long history of items 1, 2 and 3. Today you enter item 1 and its price. The query runs and checks that newly entered price against that items price between now to 2 months ago. It finds that the newly entered price falls outside a threshold increase (say 10%) and alerts the user. Whereas items 2 and 3 fall within accepted thresholds and dont raise anything to the user.
More or less I thought it would nice to have some kind of system in place to catch possible incorrect pricing and to bring it to the users attention for a potential review.
I see the query having the criteria part number like that entered to narrow it down to that specific item, but don't know if the rest could be done.