Clear all Result_Ids

Clear all Result_Ids

  1. /* 
  2.     WARNING!!! THIS IS A DANGEROUS SCRIPT!!!
  3.     MAKE SURE YOU ARE USING THE RIGHT DATABASE!!!
  4.     This script will clear out all Result_Ids in a database.
  5. */

  6. USE [DATABASENAME];
  7. EXEC sp_MSforeachtable 
  8. 'UPDATE
  9.                  ?
  10. SET
  11.                  Batch_Number = 0, Result_Id = ''''
  12.   '

    • Related Articles

    • Convert Any Field into a Picklist

      The following script lets you convert any field into a picklist. --This script will convert any field (usually text fields) into Picklists --and generate Picklist Options from the values. GO DECLARE @Ids Table(Id NVARCHAR(MAX)) INSERT INTO @Ids ...
    • Other: Creating Unique Display Numbers

      The following script will create unique Final_ReferenceCode for all Contacts. It can be easily modified to apply to other record types. Please note that the Final_ReferenceCode that are generated are based on the data in the database. If you are ...
    • Other: Obtaining Record Counts for all Tables

      The following script will count all records in all tables. DECLARE @TableRowCounts TABLE ( [TableName] VARCHAR(128), [Batch_Number] INT, [Incomplete] INT, [Complete] INT, [Total] INT ) ; INSERT INTO @TableRowCounts ( [TableName], [Batch_Number], ...
    • Prioritizing documents based on different criteria

      The following scripts provide examples that can be modified to apply different priorities to documents. Prioritize Large/Small Documents If you are restoring into a system that has different action limits at different times, this can help you ...
    • Tasks and Calendar Entries: Removing Duplicate User Assignments

      Sometimes the same user is included in a calendar event, or assigned to a task, multiple times. This can be a result of User Mapping or data error in the legacy system. Below is an example of how this can happen. A calendar event includes user John ...