tech

Finding duplicate records in a database: the SQL HAVING clause

One issue I run across occasionally is a table with duplicate entries such as two entries for the same company in an accounts payable system.  This can create embarrassing problems with billing if ACME Inc #1 is 90 days overdue because someone posted a payment, and now a credit, to ACME Inc #2. I ran

Read More »

Using Google Maps with the Garmin Zumo 660

One of the best things about motorcycling is spending a nice day exploring twisty back roads far from home.  One of the worst things is getting lost while running low on fuel and being clueless not only about where you are but where to find gas.  Fortunately, technology comes to the rescue again with a

Read More »

Returning latest/highest record from a set of records

A common reporting requirement in database applications is selecting the latest purchase, or latest job, or oldest chlld for each person in a table.  Any beginning student of SQL knows how to return the most recent date in a table: SELECT MAX(rec_date) FROM sales; max ——————————- 2011-03-15 18:04:45.178057-04 (1 row) But that doesn’t tell us

Read More »
Scroll to Top