Hello,
I need a sort of auditing query that checks to see if numbers are within a range. Here is an example of the data.
Lets say I am selling fruits and giving (selling) certain fruits a barcode range that they can apply to their fruits
BCLog (barcode start, barcode finish, product)
100000, 400000, Apples
400001, 600000, Bananas
600001, 900000, Oranges
900001, 999999, Watermelon
And then I have a separate table that contains info of the barcodes that were ACTUALLY placed on the fruits (on certain times, etc.)
BCUsed (barcode start, barcode finish, product, day applied)
200000, 300000, Apples, Monday
500000, 505000, Bananas, Tuesday
800000, 900000, Oranges, Thursday
600000, 700000, Watermelon, Thursday
How could I write a query that calls out any errors if the fruit placed barcodes in the wrong range?
I need a sort of auditing query that checks to see if numbers are within a range. Here is an example of the data.
Lets say I am selling fruits and giving (selling) certain fruits a barcode range that they can apply to their fruits
BCLog (barcode start, barcode finish, product)
100000, 400000, Apples
400001, 600000, Bananas
600001, 900000, Oranges
900001, 999999, Watermelon
And then I have a separate table that contains info of the barcodes that were ACTUALLY placed on the fruits (on certain times, etc.)
BCUsed (barcode start, barcode finish, product, day applied)
200000, 300000, Apples, Monday
500000, 505000, Bananas, Tuesday
800000, 900000, Oranges, Thursday
600000, 700000, Watermelon, Thursday
How could I write a query that calls out any errors if the fruit placed barcodes in the wrong range?