Author Topic: Erasing Old Work Period  (Read 14219 times)

Saurav

  • Newbie
  • *
  • Posts: 1
Erasing Old Work Period
« on: September 22, 2013, 02:35:48 am »
How can I erase the work periods for older times.

lemmings

  • Full Member
  • ***
  • Posts: 165
Re: Erasing Old Work Period
« Reply #1 on: September 24, 2013, 05:28:29 am »
I was just working on a SQL script to do the same.

Although not sure how it will work yet so let me do some tests and I will let you know.

You using SQL Express or SQL Compact.

What I have been doing up to now is taking a database backup and the clearing all transactional data from database effectively starting with no work periods again and using the backup with another SQL Instance if I need to refer to it (for accounts purposes) - I copied various data to an Excel spreadsheet as well.

Marco

  • Newbie
  • *
  • Posts: 16
Re: Erasing Old Work Period
« Reply #2 on: October 10, 2013, 06:00:42 pm »
I would be interested in this SQL script as we'll.

As our till is operated by a number of volunteers, I asked them to just give every training/test session the work period description 'test'.

This I then exclude from reports.

However it would be nice if I could 'clean' them from the database. Esp. When we are starting to work with recipes and inventory.

Cheers
Marco

JohnS

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 677
Re: Erasing Old Work Period
« Reply #3 on: October 10, 2013, 06:13:15 pm »
For training you should really use SambaPOS training mode (search it).

Using SQL to remove selected data is a dangerous move. Not so much in V2, but V3 has interlocked tables. And inventory is worse. When I wrote the bulk import script it took days to get it right, and I also looked at a "reset" script to reset inventory back to imported levels, and this was not possible at that time. Not all processing of inventory is done at End of Work Period.

Please be very careful as you could destroy data and not realise.
SambaPOS - POS'n the World, one Terminal at a time.

lemmings

  • Full Member
  • ***
  • Posts: 165
Re: Erasing Old Work Period
« Reply #4 on: October 11, 2013, 06:15:07 am »
Yes I agree if its just for training purposes, use the training mode scripts, thats what I also do for new staff/trainees.

Im referring to V2 as I have not even looked at V3 databases yet !!