Database Query T'ool

General Information about POS Pizza 6 and 7
Post Reply
User avatar
wcpc
Active Member
Active Member
Posts: 42
Joined: Thu Apr 28, 2016 1:49 pm
Location: Charleston, IL
Contact:

Database Query T'ool

Post by wcpc »

I installed the latest 7.22 CS version... and I see a "new addition" is the Database Query Tool... I have looked for it everywhere... where is it located, and tell me a little about what it's uses are please...
JimD
Windy City Pizza
Charleston, IL
User avatar
Scott
Site Admin
Site Admin
Posts: 2564
Joined: Wed Apr 16, 2003 5:35 pm
Location: Western PA

Re: Database Query T'ool

Post by Scott »

The tool allows you to query the database using SQL and output to a CSV file any data that is in the query. It is template based so that you can have them run as events or scheduled using something like the Windows scheduler.

Look in the installation folder. There is a document file (PDF) and some sample templates which are installed if you selected the option during install.


Scott
seaside
New Member
New Member
Posts: 3
Joined: Tue Mar 14, 2017 8:38 am

Re: Database Query T'ool

Post by seaside »

Could this be used to show all orders that were tax exempt for this year?
User avatar
Scott
Site Admin
Site Admin
Posts: 2564
Joined: Wed Apr 16, 2003 5:35 pm
Location: Western PA

Re: Database Query T'ool

Post by Scott »

seaside wrote:Could this be used to show all orders that were tax exempt for this year?
Yes. Just create a query to look for those specific parameters, and pass it to the tool.

Off the top of my head that would look something like;

Code: Select all

server=auto
database=pospizza.pz6
query=SELECT order_number, order_date FROM orders_tbl
      WHERE tax_exempt != 0 AND voided_order=0 AND record_type=1 AND 
      order_date BETWEEN '2019-01-01 00:00:00' AND '2019-12-31 23:59:59'
      ORDER BY order_number ASC;
csv=tax_exempt_orders.csv
Scott
906tribe
Member
Member
Posts: 5
Joined: Mon Apr 07, 2014 9:23 am

Re: Database Query T'ool

Post by 906tribe »

Scott can't seem to find the Data Query tool any help would be appreciated

Dennis
User avatar
Scott
Site Admin
Site Admin
Posts: 2564
Joined: Wed Apr 16, 2003 5:35 pm
Location: Western PA

Re: Database Query T'ool

Post by Scott »

Run the installer for v7.32 (or newer) and there's an option on the page after the main list of applications (where create desktop icons is) that allows you to install the query tool. Once installed, you will need to go into the C:\POSPizza6\CS folder and locate the app there. The app is called POSPZDBQT.exe, and there are some sample scripts all named POSPZDBQT_sampleX.txt. A link to the PDF document file should be installed on the desktop of the machine. This document explains the app in detail along with the structure of the database layout.

Scott
Post Reply