re-set rewards points

Questions and Answers that relate to the [CS] Version of POS Pizza 6 and 7
Post Reply
rahmiolgac84
Member
Member
Posts: 25
Joined: Fri Mar 20, 2015 9:00 pm

re-set rewards points

Post by rahmiolgac84 »

hi, How can I reset awarded points?
I would like to make all previously awarded points zero and restart.
User avatar
Scott
Site Admin
Site Admin
Posts: 2564
Joined: Wed Apr 16, 2003 5:35 pm
Location: Western PA

Re: re-set rewards points

Post by Scott »

You will need to use a 3rd party SQL tool to do them all at once. You can use SQLite Expert, or SQLite3.exe which is a command line tool from sqlite.org (or any others of your choosing).

Execute the following command on your database (pospizza.PZ6):

UPDATE customers_tbl SET points=0;


This will reset all customer records to zero points.


P.S. Always use extreme caution when using 3rd party tools on your POS Pizza database, and always do a backup before starting!


Scott
treefetty
Member
Member
Posts: 27
Joined: Mon Dec 04, 2017 2:26 am

Re: re-set rewards points

Post by treefetty »

I would like to know how to do this as well and I'm not understanding the process of editing with a SQL program. Are the database files only located on PC being used as the server? I downloaded APEX SQL and there are all types of .exes? Like "Build" "Analyze" "Generate". Any more information would be appreciated. Thanks
User avatar
Scott
Site Admin
Site Admin
Posts: 2564
Joined: Wed Apr 16, 2003 5:35 pm
Location: Western PA

Re: re-set rewards points

Post by Scott »

If you are not familiar with SQL, then I don't recommend using an editor. If you try, make a backup of your current database beforehand.

You can export your customers to CSV and then re-import them. Simply omit importing the "Points" field when doing the import, and all rewards will be set to ZERO. Note, you will lose the links between your customers and their previous orders when doing this.

-------------------------
Editing the SQL

The database is usually named POSPizza.PZ6 and can be found in the server program's folder (C:\POSPizza6\Server). Shutdown the server, then make a copy of this file as a backup before editing it. Next open the POSPizza.PZ6 file with an SQLite editor such as SQLiteExpert Personal Edition (I don't know anything about APEX). Go into the part of the editor where you can issue direct SQL commands against the database. Issue the following command:

UPDATE customers_tbl SET points=0;

This will zero out the points field for all customers in the database. Exit the editor, start the server up again, and then check the results in the Management Utility.



Scott
rahmiolgac84
Member
Member
Posts: 25
Joined: Fri Mar 20, 2015 9:00 pm

Re: re-set rewards points

Post by rahmiolgac84 »

Scott,
it would great if you add this option to "DB maintenance tool". Please!
Post Reply