Jump to content
Server Maintenance This Week. ×

Batch Number History


This topic is 6252 days old. Please don't post here. Open a new topic instead.

Recommended Posts

This is a trivial problem for someone out there with more brains than I've got.

My DB keeps track of cleans for coolrooms. The operators use up to four different cleaning products. They use whichever batch no. is 'Current'.

My customer needs to keep track of the dates during which a particular batch was used. The detail of the calculation is simple enough; it's the structure that has me tricked.

I've ended up with four extra table, one for each product. The fields in the tables are simply Date Started, Batch #, If Current. This just seems kludgey. It's also a PITA because this is a runtime solution and upgrades mean importing existing data - 4 imports to go wrong just for a bit of trivia!

I considered repeating fields for a second or two but they're out for a few reasons, one of which is that whatever number of repetitions you choose, it will be 1 less than you need.

Another alternative is permanent 'stacks' of batch info in each coolroom record. This is also a bit kludgey and difficult to print.

Am I missing some obvious solution?

Link to comment
Share on other sites

You need a single table for Products: a field takes care of the product type for you. You'll need a table for the Batch which is related to the Products.

I'd have another table for Coolrooms, and a Cleaning table that effectively joins the Coolroom and Batch tables.

Link to comment
Share on other sites

Thanks, Vaughan. I did consider that but rejected it on the grounds that I hate setting up a table with just four records; it also involves a messier method of getting at the current batch. Must admit it is a neater solution; I think I'll do it.

(The second half is well taken care of.)

Link to comment
Share on other sites

This topic is 6252 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.