Founding customers: 10 free pilots in 2027. See the offer

Legacy schema traps · Status, flags and deletion

Why does my SQL total not match the ERP screen?

Usually because deleted or cancelled rows are still in the table, marked by a flag. The screen hides them; a plain SUM() counts them.

Run the free schema checkFree · five minutes · only schema and aggregates leave you

What it looks likeIllustrative

ORDLIN.DELETED='J' on 4 % of lines; the screen total skips them, SUM() does not.

All table and column names are invented.

Why reports and AI agents get it wrong

Nothing in the schema says the flag matters.

A first check you can run

For one-letter columns, look at the value distribution; a small share of an unusual value is often a deletion or cancellation flag.

Read-only and on the catalogue or aggregates: it looks at structure and value counts, not at individual records.

How Janus Works handles it

The filter becomes part of every tool, and the Golden Master compares totals with the screen.

Every number verified against your own screens. Deviations shown, never hidden.

Common in the Jeeves database.

Run the free schema checkFind the traps in your own database. Free schema check, five minutes.