PL/SQL Referencing a table named in a column

From: Jeff Arnfield <jarnfiel_at_tricon.net>
Date: 1997/03/10
Message-ID: <5g1kd2$7t9_at_news1-alterdial.uu.net>#1/1


[Quoted] We have an application that includes some BLOBS of varying size. To minimize chaining and facilitate storage management, we're putting the BLOBs in separate tables and refering to them using a numeric key. However, upon deleting a row that refers to a BLOB, I want to use a trigger to also delete the row containing the actual BLOB in the separate table.

It's possible that we'll choose to move the BLOBs to different tables, depending upon size, query frequency and access speed requirements. For that reason, I'd like to store the name of the table containing the BLOB in a column in the table that references the blob.

[Quoted] Is there a way I can get PL/SQL (either directly in the trigger or in a stored procedure) to get the name of the table to operate on from the column that contains that table name, then issue the delete, without hard-coding the table names in the PL/SQL block and using a conditional test to compare the table name stored in the column with table names known in the PL/SQL procedure?

Thanks in advance -

Jeff Arnfield
Williams Info Eng
jarnfiel_at_tricon.net Received on Mon Mar 10 1997 - 00:00:00 CET

Original text of this message