Posted on 1997-08-18
I'm building a relational database (Paradox-tables) with about 15 tables that are related to eachother. When I delete a certain product that belongs to a certain customer I want to delete all records in about 10 tables with the following condition:
if (CustomerNumber = '???') AND (ProductNumber = '???') then
delete the record
I've managed to use the TQuery object to delete the correct records from one table, the problem is how to do it from many tables, preferrably with one single SQL-question.
The fields "CustomerNumber" and "ProductNumber" are of course present in all the tables.
How do I solve this? Could you give me an example of what properties I need to set and the exact formulation of the SQL-query, I would be very grateful.
Daniel Persson, Sweden