Resetting ticket number

hellow, im trying to reset the ticket number following this emre method:
but…it doesnt reset the number generator…im using sambapos in spanish…i have also try to set the "where name = " to my column table name that is is spanish but it also doesnt work…any idea why?
Or any other method please

Yes you can use database tools.

  • Open [MyDocuments]\SambaPOS4\Database Tasks folder.
  • Create a new file and name it as [CBL]Reset Ticket Number Generator.sql . Be sure it’s extension is .sql

  • Edit that file with a text editor (notepad) add that script and save it.

Update Numerators set Number = 29119 where Name = 'Ticket Number Generator'

  • When you open database tools you should see your script listed here. Be sure Task Type is SQL.

Click on that task and click Execute Task button.

With that method you can run any sql snippet we release here.

Note: For anyone interested [CBL] part means C onfirm, B ackup, L ogout and you can execute tasks with Execute Database Task action.

Do you really want to set the Ticket Number to 29119 ?

1 Like

i have tried “29119” “1” “10” a bunch of numbers but with no luck.

the number is not the problem…the problem is that it doesnt work :(, i just want to ressetit to 0.

zero (0) or one(1) its my goal

Show the table in SQL for numerator.

Did you see this? You should not use this to reset to 0

@Jesse

i have tried “29119” “1” “10” a bunch of numbers but with no luck

.

Why are you wanting this?

why do you want to know the why??? it is relevant??? because ive started doind some testing with a client and now that we have finish the testing we want to start the number ticket from 1…

dont want to sound rude…just…we want to start now that we got all the right recipes etc etc we want to start selling…and to do so we need to start that ticket number from 1…

He askes because just resetting number on its own is very bad idea as will cause duplicates unless all transnational data is also cleared (not your setup and products etc but the testing tickets and orders etc.
Which is why the database tools script that can be run direct within samba was suggested. Its a paid module in v4 on the market screen but you can install and run the script in trial mode then uninstall afterwards to get rid of the activation popups for the module.

2 Likes

there will no be duplicates because as you said i will use “clear all transaction data”…but…please is there a way to accomplish that ticket number ressetting?? i didnt understand what paid module you suggested me¿¿?? im using v5 last version…

Your posting in a V4 question which is why I said that.
Clear database tasks is in database tools available by default in v5 and it should reset the ticket number.

Yes it is relevant I want to help you but I will not help someone accidentally break their system. Doing this can break your system to where it is almost not usable if you start getting duplicate tickets it will lead to constant crashing etc. I have no way to know what you are trying to do with this other than guess. I wanted to make sure you were not going to accidentally break your system because most people that ask this just want a simple resetting ticket number.

First clear all transactions then run this query.
Backup your database in case I gave you wrong syntax and the world explodes… not really but backup anyway…

Run this in MSSMS.
DBCC CHECKIDENT (TICKETS, reseed, 1)

1 Like

Is this ticket id or ticket number then?
You script would be to reset ticket id right Jesse?
The numerators are for ticket number rather than id.

1 Like

This will reseed that entire table. He wants to start from scratch right? Numerators get reset when you run the clear transactions tool so I was thinking this is misunderstanding? Maybe he meant ticket id all along?