• Eirikur,

    I changed a bit of your script but the results are not as expected.

    -- THE PATTERN TO SEARCH FOR

    DECLARE @SEARCH_STRING NVARCHAR(100) = N'<<search string>>';

    DECLARE @SQL_STR VARCHAR(MAX) = N''

    DECLARE @SEARCH_TEMPLATE NVARCHAR(MAX) = N' {{@TABLE_NAME}} -- {{@COLUMN_NAME}}

    ';

    executing your script with these changes will promp some tables and all of its columns.

    selecting data from this table (select * from tablename) shows me empty tables and tables containing data but in this data the <<search string>> is not to be found....

    please your reaction on this.

    Regards,

    Guus