search for a value in the entire database

  • Hello to All,

    I recently migrated a mimer database to SQL server. There has been a problem in the mimer db: the relations are not exactly referenced by the real FK, rather by a different column name.

    I would like to create the table relations by searching through a known value and to fetch which other tables has the same value in the sql db.

     

    How could i achive this.

     

    thanks for any help

     

    kesk

  • Basically you need to loop through the information.schema tables and get the tables and columns. You can execute select statements on those.

    Rather than rewriting, this link will do you.

    http://vyaskn.tripod.com/search_all_columns_in_all_tables.htm


    ------------------------------
    The Users are always right - when I'm not wrong!

  • Hi,

    Thanks for your reply, it solved my requirements.

    kesk

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

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