Thanks for the reply, but I did leave one thing out of my original post. Maybe I was embarrassed to say it, but I’m using Access from that group that goes in its own direction. If you don’t mind dirty words in the forum, it’s “Microsoft”.

I can find no reference to either REPLACE ot ON DUPLICATE KEY UPDATE in the documentation from Bill Gates.

I’ll give both of your suggestions a try just in case ODBC expands his concept of how to do things.

I love standards, there are so many to choose from!

If all else fails I can just query the table first to see if the record already exists. Not the best way, but it is the Microsoft way!

If all else fails I can just query the table first to see if the record already exists. Not the best way, but it is the Microsoft way!

Nothing wrong with this approach. As far as I can say, the replace query is not a standard SQL command, but probably an extension available on only some relational database engines. If you don't have it, just do it in a two-step (or perhaps even three-step) procedure along the following lines: - update it it exists, else create, or - delete if it exists, then create. After all, Perl is a procedural language that enables you to do thiunks that can't be done in pure SQL. In fact, I did something similar that recently in PL/SQL (so nothing to do with Microsoft, and, although I might be wrong, I do not think that a replace query exists in Oracle SQL). (I wish I could have done it in Perl with DBI, I would have saved quite a bit of time, but the client unfortunately demanded explicitely programs to be written in PL/SQL.)