Hi My stock serial number format is 00001A - 99999A, 00001B - 99999B ... 00001Z - 99999Z.
These stocks are check in to warehouse in different order, so the worker may check in the stocks like 00001A - 00100A 99999B - 00010C 00051B - 00070B I have a table to keep track the stock check in transaction: STOCK_CHECKIN start_sequence int(10) unsigned start_batch char(1) end_sequence int(10) unsigned end_batch char(1) and the data for the above example will look like this: start_sequence start_batch end_sequence end_batch 00001 A 00100 A 99999 B 00010 C 00051 B 00070 B I couldn't figure out how to determine if a specific serial number is already checked in into the warehouse. Based on the above data, the serial number 00010A, 00001C and 00070B are already checked in. How would be the effective SQL looks like? Thank you! -- Hez