Legacy schema traps · Dates and time
Why is the price from SQL different from the price on the order?
Because prices are valid from a date. The right price depends on customer, item and order date together; the latest price row gives today's price, not the one on the order.
What it looks likeIllustrative
PRICE(ITEMNO, CUSTGROUP, VALIDFROM, PRICE) with three rows for the same item.
All table and column names are invented.
Why reports and AI agents get it wrong
It takes the latest row, or any row, instead of the one valid on the order date.
A first check you can run
Tables with a “valid from” date in the key and several rows per item.
Read-only and on the catalogue or aggregates: it looks at structure and value counts, not at individual records.
How Janus Works handles it
Price tools take the date as input and are checked against real quotes on screen.
Every number verified against your own screens. Deviations shown, never hidden.
Common in the Jeeves database.