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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

POS 3700 Finding old item

Status
Not open for further replies.

Rekragisao

Technical User
Jul 19, 2017
3
NL
Dear sirs and madams,

The company I work for uses, and has been using a POS 3700 system for quite some time now.

In the years data has been added but never deleted or kept up to date. Since I have recently become responsible for managing this system i would like to delete all Menu Items that no longer have any data inside the Historical Totals and for which no sales records can be viewed anymore.

I've been going trough the Database Schema Report in the hopes of finding the right connections to pull this data from the DB with a query but have not been able to find it.

Does anyone know how I can find the Menu Items that haven't seen any use since a set date?

Thanks for taking the time and effort of reading this!
 
As far as i know, if there is even a single transaction even 10 years back, it will not allow you to delete the Menu Item.
Only possible way that i know of is clearing the Totals, but his will erase complete data for everything.
 
It depends on how long your historical totals are set to save. Our system saves 365 days worth so as soon as an item hasn't been sold within that time frame we can delete it. Before? Error message about being in use.

Check your historical total settings and if the time frame is OK with you, just try deleting items. If it's not been sold it will delete. If it has been it won't.
 
Thanks for the pointers guys! I've figured out how to do it by now and have deleted the no loner useful items.

For future reference this is the code i used to erase all menu items without sales records, SLU values, is not in a specific group (index buttons etc.) or has a printing value that will not be registered within sales. If anyone is looking to do the same and has any questions feel free to shoot me a message.

SQL:
DELETE FROM micros.mi_def
WHERE mi_seq IN(SELECT a.mi_seq
	FROM micros.mi_def a
		LEFT JOIN micros.dly_sys_mi_ttl
			ON b.mi_seq=a.mi_seq
WHERE b.mi_seq IS NULL
AND a.mi_slu_seq IS NULL
AND a.mi_slu2_seq IS NULL
AND a.mi_slu3_seq IS NULL
AND a.mi_slu4_seq IS NULL
AND a.mi_slu5_seq IS NULL
AND a.mi_slu6_seq IS NULL
AND a.mi_slu7_seq IS NULL
AND a.mi_slu8_seq IS NULL
AND a.maj_grp_seq <> #
AND a.prn_def_class_seq BETWEEN # and #)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top