I need to do a backup of data across all tables of a database, but I need to restrict the output to a specific column value of a base table.
The schema in question has a base table which has some client number I need to back up.

The reason I need this is that we have to delete a record from this base table where the client id = @clientID.
All relationships to this table are set to cascade delete.
We have a script to backup 8 tables from a small section of the schema based on some values, but to adapt this to accomodate 80+ tables is likely to be time consuming and error prone, so I'd rather generate the scripts automatically (if possible) or use a tool tailored for this kind of job.

I need the output to show the column values for each table rather than one big row which you get with an inner join across all tables.

Any ideas?


Steve York