Read Tablename from a file

  • Hi All,

    I have to read table name in a file whose data is getting updated or deleted.

    for ex:

    1:Query: update tab1 set col1 = 1

    From this file, i need Tab1

    2:Update a

    set a.col2 = 1

    from tab2

    inner join

    tab3

    from this, i need tab2.

    is there any way to get the table name from this file whose data is getting updated?

    similar case in delete.

  • This sounds like an extremely strange architecture...are you sure you want to allow data in a text file to dynamically dictate the tables you reference in DML you apply to your database? especially for purposes of deleting data? :crazy:

    If you must proceed down this path I would say look into using the SQLCLR for this task.

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply