Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MICROS 3700: Difference between Check_Seq and Check_Num

Status
Not open for further replies.

RitwickGupta

Programmer
Aug 21, 2014
96
CA
Hello people,

I just had a curious question. There is a Check_seq and a Check_Num associated with every order in the database and POS. They both seem to increase on my demo system. What's the difference between both?
 
Chk_Seq is the internal row ID used by Sybase, and is not seen by end users.
Chk_num is the check # that is assigned by the revenue center or workstation settings, and this is visible to end-users and guests alike.
And to round it out, Id is the check id (like a name or pager information) that can be assigned by the person taking an order.
 
Do any of them reset to 0? Like I am able to see that on a live restaurant that Check_num is around 8000 and check_seq is around 500000.
 
Chk_Num will loop around as specified in the Workstation or Revenue Center settings.
Chk_seq would be a question for pmegan, moregelen, or another a bit more experienced with Micros/Sybase than I am.
 
Where do I adjust the parameter at the workstation which resets/ makes chk_num to loop?
 
If you manage to ever reach the auto increment maximum, it will fail to insert new rows. This is an SQL thing. I'm assuming Micros account for this though, and is utilizing the ability to 'purge' empty space. As in, if you are on transaction 1,000,000,000,000 (to give an example), unless you have your historical totals set to essentially never clear, then its a good bet that the sequence number 1 is no longer in use. To be perfectly honest, I'm not sure if MICROS is using an auto incrementing column; I know its a primary key, obviously, but I've never looked to see if it auto increments. I assume it does.


To set the range it uses for check numbers, see: POS Configurator -> Devices -> User Workstations, Check Start and Check End (or something equivalent).
 
The chk_seq field is an autoincrementing integer, but Micros for some reason has a constraint that sets it to max out at 2,147,483,647 instead of
 
SO there can be orders in chk_dtl which have same chk_num right?
 
Sorry, I was editing my last post and must have sent it by mistake. Too bad I'm not a tech guy :)

Anyway, the data type for chk_seq is SEQ_NUM_EX. Micros has a bunch of custom data types, and this is one of them. It's just an integer, (not a bigint), with the integer max of 2,147,483,647 set as a constraint. I don't know what will happen if that value is ever reached. However, you'd have to average 235,340 checks per day over 25 years to reach that number so it probably isn't going to be an issue. This effectively makes it unique, so it can be used as a primary key. Chk_num on the other hand can easily roll over and duplicate within the 14 day purge threshold, and will definitely do so if transaction analyzer is being used and set to retain data for a while.

I generally assign check number ranges by Revenue Center rather than Workstation, and give them ranges of a couple thousand. Ex - Dining = 1000-4999, Bar = 5000-8999, Banquet = 9000-9999. To me assigning check numbers by workstation doesn't seem useful. I'd rather be able to tell that a certain range of checks in Dining were started on the same day.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top