Page 1 of 1

Database Query T'ool

Posted: Mon Sep 02, 2019 10:37 pm
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...

Re: Database Query T'ool

Posted: Tue Sep 03, 2019 10:01 am
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

Re: Database Query T'ool

Posted: Tue Sep 03, 2019 12:28 pm
by seaside
Could this be used to show all orders that were tax exempt for this year?

Re: Database Query T'ool

Posted: Tue Sep 03, 2019 3:23 pm
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

Re: Database Query T'ool

Posted: Sun Aug 22, 2021 9:21 am
by 906tribe
Scott can't seem to find the Data Query tool any help would be appreciated

Dennis

Re: Database Query T'ool

Posted: Mon Aug 23, 2021 8:03 am
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