Print sql server substring from a table column and put into a table

  • Hello,

    Looking for a guidance to form a script to extract a specific substring (change tables) from a sql server table column and put them to another table to know the distinct tables.

    Here is the task which I'm performing:

    So captured through extended events all the strings which has the extended events. Now have to read from the statement table to identify the distinct change tables and put into a table so that would know the distinct tables are part of the change tracking.

    Now, the statement columns many have multiple change tracking tables, so need to maintain a history or some mechanism to loop through the entire string.

    If anyone has written similar script or used/any guidance please provide.

    Thanks.

  • Not exactly clear what you're trying to do yet...

    Are you talking about SQL Server's built-in change tracking, or some custom-built approach?

    If built-in, and you want to identify the distinct change tables, you could just use something like the following -- not clear why you'd need to refer to extended events

    SELECT 
    OBJECT_SCHEMA_NAME(object_id) AS SchemaName,
    OBJECT_NAME(object_id) AS ObjectName,
    *
    FROM sys.change_tracking_tables

     

  • This was removed by the editor as SPAM

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

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