How to Recover a Deleted SmartList from SmartList Builder in Dynamics GP
Uh oh. You've deleted a SmartList in Dynamics GP. Don't worry, here are some instructions and code to will help you out. I've listed the following steps to recover from a deleted SmarLlist from SmartList Builder which was built on top of a core SmartList.
Step 1) Grab and restore last night’s backup into a new database (This is the only way to recover)
Step 2) Identify the ASI_Favorite_Type associated with the core SmartList
In this case the ASI_Favorite_Type is 203 which corresponds to Account Transactions
Step 3) Add back all the records where ASI_Favorite_Type = 203 (Here are some heavy lifting scripts)
The design for the script is to select the text of the insert statement followed by a conversion (to text) of the column contents records in the from database that need to be inserted into the database from which they are deleted. I’m using the RWGO as the end of record marker. Paste the script into your management studio then regex replaces RWGO with \nGO (a new line followed by the go command).
This select statement generates an insert statement for the records in the ASIEXP60 table.
select 'INSERT INTO [dbo].[ASIEXP60] ([ASI_Favorite_Dict_ID],[ASI_Favorite_Type],[ASI_Goto_Sequence],[ASI_Goto_Prompt],[ASI_GoTo_Value],[ASI_GoTo_Default]) VALUES (' ,str(ASI_Favorite_Dict_ID) + ',' ,str(ASI_Favorite_Type) + ',' ,str(ASI_Goto_Sequence) + ',' ,'''' + REPLACE(RTRIM(ASI_Goto_Prompt),'''','''''''') + '''' + ',' ,str(ASI_Goto_Value) + ',' ,str(ASI_Goto_Default) + ')' ,'RWGO' from [ASIEXP60] where ASI_Favorite_Type = 203 GO
This select statement generates an insert statement for the records in the ASIEXP81 table
select 'INSERT INTO [dbo].[ASIEXP86]([ASI_Favorite_Dict_ID],[ASI_Favorite_Type],[ASI_Favorite_Save_Level],[CMPANYID],[USRCLASS],[USERID],[ASI_Favorite_Name],[ASI_Field_Sequence],[ASI_Include_Column],[ASI_Display_Column],[ASI_Field_Number_Dict_ID],[ASI_Field_Number],[ASI_Column_Display_Name],[ASI_Display_Column_Width]) VALUES (' ,str(ASI_Favorite_Dict_ID) + ',' ,str(ASI_Favorite_Type) + ',' ,str(ASI_Favorite_Save_Level) + ',' ,str(CMPANYID) + ',' ,'''' + RTRIM(USRCLASS) + '''' + ',' ,'''' + RTRIM(USERID) + '''' + ',' ,'''' + REPLACE(RTRIM(ASI_Favorite_Name),'''','''''''') + '''' + ',' ,str(ASI_Field_Sequence) + ',' ,str(ASI_Include_Column) + ',' ,str(ASI_Display_Column) + ',' ,str(ASI_Field_Number_Dict_ID) + ',' ,str(ASI_Field_Number) + ',' ,'''' + RTRIM(ASI_Column_Display_Name) + '''' + ',' ,str(ASI_Display_Column_Width) + ')' ,'RWGO' from ASIEXP86 where ASI_Favorite_Type = 203
This select statement generates an insert statement for the records in the ASITAB20 table
select 'INSERT INTO [dbo].[ASITAB20]([ASI_Favorite_Dict_ID],[ASI_Favorite_Type],[ASI_Field_Sequence],[ASI_Field_Number],[ASI_Field_Number_Dict_ID],[ASI_Field_Name],[ASI_Field_Display_Name],[ASI_Field_Physical_Name],[ASI_Field_Use_UsrDef_Prm],[ASI_Field_DDL_Type],[ASI_Field_Datatype],[ASI_Field_Format_String],[ASI_Field_In_Lookup_Tabl],[ASI_Include_Column],[ASI_Display_Column],[ASI_Field_Description],[ASI_Field_Custom_Query],[ASI_Table_Technical_Name]) VALUES (' ,str(ASI_Favorite_Dict_ID) + ',' ,str(ASI_Favorite_Type) + ',' ,str(ASI_Field_Sequence) + ',' ,str(ASI_Field_Number) + ',' ,str(ASI_Field_Number_Dict_ID) + ',' ,'''' + REPLACE(RTRIM(ASI_Field_Name),'''','''''''') + '''' + ',' ,'''' + REPLACE(RTRIM(ASI_Field_Display_Name),'''','''''''') + '''' + ',' ,'''' + REPLACE(RTRIM(ASI_Field_Physical_Name),'''','''''''') + '''' + ',' ,str(ASI_Field_Use_UsrDef_Prm) + ',' ,str(ASI_Field_DDL_Type) + ',' ,str(ASI_Field_Datatype) + ',' ,'''' + REPLACE(RTRIM(ASI_Field_Format_String),'''','''''''') + '''' + ',' ,str(ASI_Field_In_Lookup_Tabl) + ',' ,str(ASI_Include_Column) + ',' ,str(ASI_Display_Column) + ',' ,'''' + REPLACE(RTRIM(ASI_Field_Description),'''','''''''') + '''' + ',' ,'''' + REPLACE(RTRIM(ASI_Field_Custom_Query),'''','''''''') + '''' + ',' ,'''' + REPLACE(RTRIM(ASI_Table_Technical_Name),'''','''''''') + '''' ,')' ,'RWGO' from ASITAB20 where ASI_Favorite_Type = 203
This select statement generates an insert statement for the records in the ASIEXP81 table
select 'INSERT INTO [dbo].[ASIEXP81]([ASI_Favorite_Dict_ID],[ASI_Favorite_Type],[ASI_Favorite_Save_Level],[CMPANYID],[USRCLASS],[USERID],[ASI_Favorite_Name],[ASI_Field_Dict_ID_1],[ASI_Field_Dict_ID_2]' ,',[ASI_Field_Dict_ID_3],[ASI_Field_Dict_ID_4],[ASI_Field_List_1],[ASI_Field_List_2],[ASI_Field_List_3],[ASI_Field_List_4],[ASI_Search_Type_1],[ASI_Search_Type_2],[ASI_Search_Type_3]' ,',[ASI_Search_Type_4],[ASI_Match_Case_1],[ASI_Match_Case_2],[ASI_Match_Case_3],[ASI_Match_Case_4],[ASI_Start_Account_Number_1_1],[ASI_Start_Account_Number_1_2],[ASI_Start_Account_Number_1_3]' ,',[ASI_Start_Account_Number_1_4],[ASI_Start_Account_Number_1_5],[ASI_Start_Account_Number_1_6],[ASI_Start_Account_Number_1_7],[ASI_Start_Account_Number_1_8],[ASI_Start_Account_Number_2_1]' ,',[ASI_Start_Account_Number_2_2],[ASI_Start_Account_Number_2_3],[ASI_Start_Account_Number_2_4],[ASI_Start_Account_Number_2_5],[ASI_Start_Account_Number_2_6],[ASI_Start_Account_Number_2_7]' ,',[ASI_Start_Account_Number_2_8],[ASI_Start_Account_Number_3_1],[ASI_Start_Account_Number_3_2],[ASI_Start_Account_Number_3_3],[ASI_Start_Account_Number_3_4],[ASI_Start_Account_Number_3_5]' ,',[ASI_Start_Account_Number_3_6],[ASI_Start_Account_Number_3_7],[ASI_Start_Account_Number_3_8],[ASI_Start_Account_Number_4_1],[ASI_Start_Account_Number_4_2],[ASI_Start_Account_Number_4_3]' ,',[ASI_Start_Account_Number_4_4],[ASI_Start_Account_Number_4_5],[ASI_Start_Account_Number_4_6],[ASI_Start_Account_Number_4_7],[ASI_Start_Account_Number_4_8],[ASI_Start_Date_Token_DDL_1]' ,',[ASI_Start_Date_Token_DDL_2],[ASI_Start_Date_Token_DDL_3],[ASI_Start_Date_Token_DDL_4],[ASI_Start_Date_1],[ASI_Start_Date_2],[ASI_Start_Date_3],[ASI_Start_Date_4],[ASI_Start_DDL_1]' ,',[ASI_Start_DDL_2],[ASI_Start_DDL_3],[ASI_Start_DDL_4],[ASI_String_Start_1],[ASI_String_Start_2],[ASI_String_Start_3],[ASI_String_Start_4],[ASI_End_Account_Number_1_1]' ,',[ASI_End_Account_Number_1_2],[ASI_End_Account_Number_1_3],[ASI_End_Account_Number_1_4],[ASI_End_Account_Number_1_5],[ASI_End_Account_Number_1_6],[ASI_End_Account_Number_1_7]' ,',[ASI_End_Account_Number_1_8],[ASI_End_Account_Number_2_1],[ASI_End_Account_Number_2_2],[ASI_End_Account_Number_2_3],[ASI_End_Account_Number_2_4],[ASI_End_Account_Number_2_5]' ,',[ASI_End_Account_Number_2_6],[ASI_End_Account_Number_2_7],[ASI_End_Account_Number_2_8],[ASI_End_Account_Number_3_1],[ASI_End_Account_Number_3_2],[ASI_End_Account_Number_3_3]' ,',[ASI_End_Account_Number_3_4],[ASI_End_Account_Number_3_5],[ASI_End_Account_Number_3_6],[ASI_End_Account_Number_3_7],[ASI_End_Account_Number_3_8],[ASI_End_Account_Number_4_1]' ,',[ASI_End_Account_Number_4_2],[ASI_End_Account_Number_4_3],[ASI_End_Account_Number_4_4],[ASI_End_Account_Number_4_5],[ASI_End_Account_Number_4_6],[ASI_End_Account_Number_4_7]' ,',[ASI_End_Account_Number_4_8],[ASI_End_Date_Token_DDL_1],[ASI_End_Date_Token_DDL_2],[ASI_End_Date_Token_DDL_3],[ASI_End_Date_Token_DDL_4],[ASI_End_Date_1],[ASI_End_Date_2]' ,',[ASI_End_Date_3],[ASI_End_Date_4],[ASI_End_DDL_1],[ASI_End_DDL_2],[ASI_End_DDL_3],[ASI_End_DDL_4],[ASI_String_End_1],[ASI_String_End_2],[ASI_String_End_3],[ASI_String_End_4]' ,',[ASI_Search_From_Str_1],[ASI_Search_From_Str_2],[ASI_Search_From_Str_3],[ASI_Search_From_Str_4],[ASI_Search_To_Str_1],[ASI_Search_To_Str_2],[ASI_Search_To_Str_3],[ASI_Search_To_Str_4]' ,',[ASI_Search_Logic_Type],[ASI_Max_Records],[ASI_Sort_Dict_ID],[ASI_Sort_Field],[ASI_Sort_Type],[ASI_Field_Comparison_1],[ASI_Field_Comparison_2],[ASI_Field_Comparison_3]' ,',[ASI_Field_Comparison_4],[ASI_Start_Comp_Field_ID_1],[ASI_Start_Comp_Field_ID_2],[ASI_Start_Comp_Field_ID_3],[ASI_Start_Comp_Field_ID_4],[ASI_Start_Comp_Field_Dic_1]' ,',[ASI_Start_Comp_Field_Dic_2],[ASI_Start_Comp_Field_Dic_3],[ASI_Start_Comp_Field_Dic_4],[ASI_End_Comp_Field_ID_1]' ,',[ASI_End_Comp_Field_ID_2],[ASI_End_Comp_Field_ID_3],[ASI_End_Comp_Field_ID_4],[ASI_End_Comp_Field_Dict_1],[ASI_End_Comp_Field_Dict_2]' ,',[ASI_End_Comp_Field_Dict_3],[ASI_End_Comp_Field_Dict_4]) VALUES (' ,str(ASI_Favorite_Dict_ID) + ',' ,str(ASI_Favorite_Type) + ',' ,str(ASI_Favorite_Save_Level) + ',' ,str(CMPANYID) + ',' ,'''' + RTRIM(USRCLASS) + '''' + ',' ,'''' + RTRIM(USERID) + '''' + ',' ,'''' + RTRIM(ASI_Favorite_Name) + '''' + ',' ,str(ASI_Field_Dict_ID_1) + ',' ,str(ASI_Field_Dict_ID_2) + ',' ,str(ASI_Field_Dict_ID_3) + ',' ,str(ASI_Field_Dict_ID_4) + ',' ,str(ASI_Field_List_1) + ',' ,str(ASI_Field_List_2) + ',' ,str(ASI_Field_List_3) + ',' ,str(ASI_Field_List_4) + ',' ,str(ASI_Search_Type_1) + ',' ,str(ASI_Search_Type_2) + ',' ,str(ASI_Search_Type_3) + ',' ,str(ASI_Search_Type_4) + ',' ,str(ASI_Match_Case_1) + ',' ,str(ASI_Match_Case_2) + ',' ,str(ASI_Match_Case_3) + ',' ,str(ASI_Match_Case_4) + ',' ,'''' + RTRIM(ASI_Start_Account_Number_1_1) + '''' + ',' ,'''' + RTRIM(ASI_Start_Account_Number_1_2) + '''' + ',' ,'''' + RTRIM(ASI_Start_Account_Number_1_3) + '''' + ',' ,'''' + RTRIM(ASI_Start_Account_Number_1_4) + '''' + ',' ,'''' + RTRIM(ASI_Start_Account_Number_1_5) + '''' + ',' ,'''' + RTRIM(ASI_Start_Account_Number_1_6) + '''' + ',' ,'''' + RTRIM(ASI_Start_Account_Number_1_7) + '''' + ',' ,'''' + RTRIM(ASI_Start_Account_Number_1_8) + '''' + ',' ,'''' + RTRIM(ASI_Start_Account_Number_2_1) + '''' + ',' ,'''' + RTRIM(ASI_Start_Account_Number_2_2) + '''' + ',' ,'''' + RTRIM(ASI_Start_Account_Number_2_3) + '''' + ',' ,'''' + RTRIM(ASI_Start_Account_Number_2_4) + '''' + ',' ,'''' + RTRIM(ASI_Start_Account_Number_2_5) + '''' + ',' ,'''' + RTRIM(ASI_Start_Account_Number_2_6) + '''' + ',' ,'''' + RTRIM(ASI_Start_Account_Number_2_7) + '''' + ',' ,'''' + RTRIM(ASI_Start_Account_Number_2_8) + '''' + ',' ,'''' + RTRIM(ASI_Start_Account_Number_3_1) + '''' + ',' ,'''' + RTRIM(ASI_Start_Account_Number_3_2) + '''' + ',' ,'''' + RTRIM(ASI_Start_Account_Number_3_3) + '''' + ',' ,'''' + RTRIM(ASI_Start_Account_Number_3_4) + '''' + ',' ,'''' + RTRIM(ASI_Start_Account_Number_3_5) + '''' + ',' ,'''' + RTRIM(ASI_Start_Account_Number_3_6) + '''' + ',' ,'''' + RTRIM(ASI_Start_Account_Number_3_7) + '''' + ',' ,'''' + RTRIM(ASI_Start_Account_Number_3_8) + '''' + ',' ,'''' + RTRIM(ASI_Start_Account_Number_4_1) + '''' + ',' ,'''' + RTRIM(ASI_Start_Account_Number_4_2) + '''' + ',' ,'''' + RTRIM(ASI_Start_Account_Number_4_3) + '''' + ',' ,'''' + RTRIM(ASI_Start_Account_Number_4_4) + '''' + ',' ,'''' + RTRIM(ASI_Start_Account_Number_4_5) + '''' + ',' ,'''' + RTRIM(ASI_Start_Account_Number_4_6) + '''' + ',' ,'''' + RTRIM(ASI_Start_Account_Number_4_7) + '''' + ',' ,'''' + RTRIM(ASI_Start_Account_Number_4_8) + '''' + ',' ,str(ASI_Start_Date_Token_DDL_1) + ',' ,str(ASI_Start_Date_Token_DDL_2) + ',' ,str(ASI_Start_Date_Token_DDL_3) + ',' ,str(ASI_Start_Date_Token_DDL_4) + ',' ,'''' + RTRIM(ASI_Start_Date_1) + '''' + ',' ,'''' + RTRIM(ASI_Start_Date_2) + '''' + ',' ,'''' + RTRIM(ASI_Start_Date_3) + '''' + ',' ,'''' + RTRIM(ASI_Start_Date_4) + '''' + ',' ,str(ASI_Start_DDL_1) + ',' ,str(ASI_Start_DDL_2) + ',' ,str(ASI_Start_DDL_3) + ',' ,str(ASI_Start_DDL_4) + ',' ,'''' + RTRIM(ASI_String_Start_1) + '''' + ',' ,'''' + RTRIM(ASI_String_Start_2) + '''' + ',' ,'''' + RTRIM(ASI_String_Start_3) + '''' + ',' ,'''' + RTRIM(ASI_String_Start_4) + '''' + ',' ,'''' + RTRIM(ASI_End_Account_Number_1_1) + '''' + ',' ,'''' + RTRIM(ASI_End_Account_Number_1_2) + '''' + ',' ,'''' + RTRIM(ASI_End_Account_Number_1_3) + '''' + ',' ,'''' + RTRIM(ASI_End_Account_Number_1_4) + '''' + ',' ,'''' + RTRIM(ASI_End_Account_Number_1_5) + '''' + ',' ,'''' + RTRIM(ASI_End_Account_Number_1_6) + '''' + ',' ,'''' + RTRIM(ASI_End_Account_Number_1_7) + '''' + ',' ,'''' + RTRIM(ASI_End_Account_Number_1_8) + '''' + ',' ,'''' + RTRIM(ASI_End_Account_Number_2_1) + '''' + ',' ,'''' + RTRIM(ASI_End_Account_Number_2_2) + '''' + ',' ,'''' + RTRIM(ASI_End_Account_Number_2_3) + '''' + ',' ,'''' + RTRIM(ASI_End_Account_Number_2_4) + '''' + ',' ,'''' + RTRIM(ASI_End_Account_Number_2_5) + '''' + ',' ,'''' + RTRIM(ASI_End_Account_Number_2_6) + '''' + ',' ,'''' + RTRIM(ASI_End_Account_Number_2_7) + '''' + ',' ,'''' + RTRIM(ASI_End_Account_Number_2_8) + '''' + ',' ,'''' + RTRIM(ASI_End_Account_Number_3_1) + '''' + ',' ,'''' + RTRIM(ASI_End_Account_Number_3_2) + '''' + ',' ,'''' + RTRIM(ASI_End_Account_Number_3_3) + '''' + ',' ,'''' + RTRIM(ASI_End_Account_Number_3_4) + '''' + ',' ,'''' + RTRIM(ASI_End_Account_Number_3_5) + '''' + ',' ,'''' + RTRIM(ASI_End_Account_Number_3_6) + '''' + ',' ,'''' + RTRIM(ASI_End_Account_Number_3_7) + '''' + ',' ,'''' + RTRIM(ASI_End_Account_Number_3_8) + '''' + ',' ,'''' + RTRIM(ASI_End_Account_Number_4_1) + '''' + ',' ,'''' + RTRIM(ASI_End_Account_Number_4_2) + '''' + ',' ,'''' + RTRIM(ASI_End_Account_Number_4_3) + '''' + ',' ,'''' + RTRIM(ASI_End_Account_Number_4_4) + '''' + ',' ,'''' + RTRIM(ASI_End_Account_Number_4_5) + '''' + ',' ,'''' + RTRIM(ASI_End_Account_Number_4_6) + '''' + ',' ,'''' + RTRIM(ASI_End_Account_Number_4_7) + '''' + ',' ,'''' + RTRIM(ASI_End_Account_Number_4_8) + '''' + ',' ,str(ASI_End_Date_Token_DDL_1) + ',' ,str(ASI_End_Date_Token_DDL_2) + ',' ,str(ASI_End_Date_Token_DDL_3) + ',' ,str(ASI_End_Date_Token_DDL_4) + ',' ,'''' + RTRIM(ASI_End_Date_1) + '''' + ',' ,'''' + RTRIM(ASI_End_Date_2) + '''' + ',' ,'''' + RTRIM(ASI_End_Date_3) + '''' + ',' ,'''' + RTRIM(ASI_End_Date_4) + '''' + ',' ,str(ASI_End_DDL_1) + ',' ,str(ASI_End_DDL_2) + ',' ,str(ASI_End_DDL_3) + ',' ,str(ASI_End_DDL_4) + ',' ,'''' + RTRIM(ASI_String_End_1) + '''' + ',' ,'''' + RTRIM(ASI_String_End_2) + '''' + ',' ,'''' + RTRIM(ASI_String_End_3) + '''' + ',' ,'''' + RTRIM(ASI_String_End_4) + '''' + ',' ,'''' + RTRIM(ASI_Search_From_Str_1) + '''' + ',' ,'''' + RTRIM(ASI_Search_From_Str_2) + '''' + ',' ,'''' + RTRIM(ASI_Search_From_Str_3) + '''' + ',' ,'''' + RTRIM(ASI_Search_From_Str_4) + '''' + ',' ,'''' + RTRIM(ASI_Search_To_Str_1) + '''' + ',' ,'''' + RTRIM(ASI_Search_To_Str_2) + '''' + ',' ,'''' + RTRIM(ASI_Search_To_Str_3) + '''' + ',' ,'''' + RTRIM(ASI_Search_To_Str_4) + '''' + ',' ,str(ASI_Search_Logic_Type) + ',' ,str(ASI_Max_Records) + ',' ,str(ASI_Sort_Dict_ID) + ',' ,str(ASI_Sort_Field) + ',' ,str(ASI_Sort_Type) + ',' ,str(ASI_Field_Comparison_1) + ',' ,str(ASI_Field_Comparison_2) + ',' ,str(ASI_Field_Comparison_3) + ',' ,str(ASI_Field_Comparison_4) + ',' ,str(ASI_Start_Comp_Field_ID_1) + ',' ,str(ASI_Start_Comp_Field_ID_2) + ',' ,str(ASI_Start_Comp_Field_ID_3) + ',' ,str(ASI_Start_Comp_Field_ID_4) + ',' ,str(ASI_Start_Comp_Field_Dic_1) + ',' ,str(ASI_Start_Comp_Field_Dic_2) + ',' ,str(ASI_Start_Comp_Field_Dic_3) + ',' ,str(ASI_Start_Comp_Field_Dic_4) + ',' ,str(ASI_End_Comp_Field_ID_1) + ',' ,str(ASI_End_Comp_Field_ID_2) + ',' ,str(ASI_End_Comp_Field_ID_3) + ',' ,str(ASI_End_Comp_Field_ID_4) + ',' ,str(ASI_End_Comp_Field_Dict_1) + ',' ,str(ASI_End_Comp_Field_Dict_2) + ',' ,str(ASI_End_Comp_Field_Dict_3) + ',' ,str(ASI_End_Comp_Field_Dict_4) + ')' ,'RWGO' from ASIEXP81 where ASI_Favorite_Type = 203
Step 4) Add back the main SLB record where SmartList_Name = ‘Account Transactions’
select 'INSERT INTO [dbo].[SLB10000]([SmartList_ID],[SmartList_Name],[SmartList_Item_Name],[SmartList_Number],[GoTo_Number],[Summary_SmartList_CB],[PRODID],[Series_Number],[NOTEINDX],/*[CREATDDT],*/[CRUSRID],/*[MODIFDT],*/[MDFUSRID],[TXTFIELD]) VALUES (' ,'''' + REPLACE(RTRIM(SmartList_ID),'''','''''''') + '''' + ',' ,'''' + REPLACE(RTRIM(SmartList_Name),'''','''''''') + '''' + ',' ,'''' + REPLACE(RTRIM(SmartList_Item_Name),'''','''''''') + '''' + ',' ,str(SmartList_Number) + ',' ,str(GoTo_Number) + ',' ,str(Summary_SmartList_CB) + ',' ,str(PRODID) + ',' ,str(Series_Number) + ',' ,CAST(NOTEINDX as VARCHAR(100)) + ',' -- ,'''' + str(CREATDDT) + '''' + ',' ,'''' + REPLACE(RTRIM(CRUSRID),'''','''''''') + '''' + ',' -- ,'''' + str(MODIFDT) + '''' + ',' ,'''' + REPLACE(RTRIM(MDFUSRID),'''','''''''') + '''' + ',' ,'''' + CAST(TXTFIELD as VARCHAR(1000)) + '''' + ',' ,')' ,'RWGO' ,* from SLB10000 where SmartList_Name = 'Account Transactions'
Open the SmartList to see all the stuff that was there before but was deleted when pressing the delete button on the SmartList builder window.
Here is some other information about how we have derived which tables are affected. This will give you a list of tables that might contain SmartList related data.
select 'if (select count(*) from '+ name +') > 0','select ' + '''' + name +'''' + ',' + '/*' + name + '*/' + ' * from ',name as [nam] ,'where ASI_Favorite_Type = 203' ,'order by DEX_ROW_ID desc',* from sys.objects where [type] = 'U' and name not in ('autotemp' ,'DBVERSION' ,'DCCatalogMUMngr' ,'DCCatalogSystemSetup' ,'eConnect_Out_Setup' ,'eConnectOutTemp' ,'S1_DebugLog' ,'S1_ErrorCodes' ,'syClrAssemblies' ,'syCompanyImages' ,'syReportTemplates') and name < 'SY' and name not like 'CONSTANTS%' order by name
The results of the script generated above but commented and edited which of the tables I know may be affected.
--if (select count(*) from AAG00100) > 0 select 'AAG00100',/*AAG00100*/ * from AAG00100 where ASI_Favorite_Type = 203 order by DEX_ROW_ID desc --if (select count(*) from AAG00101) > 0 select 'AAG00101',/*AAG00101*/ * from AAG00101 where ASI_Favorite_Type = 203 order by DEX_ROW_ID desc --if (select count(*) from AAG00102) > 0 select 'AAG00102',/*AAG00102*/ * from AAG00102 where ASI_Favorite_Type = 203 order by DEX_ROW_ID desc --if (select count(*) from AAG00103) > 0 select 'AAG00103',/*AAG00103*/ * from AAG00103 where ASI_Favorite_Type = 203 order by DEX_ROW_ID desc --if (select count(*) from AAG00104) > 0 select 'AAG00104',/*AAG00104*/ * from AAG00104 where ASI_Favorite_Type = 203 order by DEX_ROW_ID desc --if (select count(*) from AAG00105) > 0 select 'AAG00105',/*AAG00105*/ * from AAG00105 where ASI_Favorite_Type = 203 order by DEX_ROW_ID desc --if (select count(*) from ACRSTBL) > 0 select 'ACRSTBL',/*ACRSTBL*/ * from ACRSTBL where ASI_Favorite_Type = 203 order by DEX_ROW_ID desc --if (select count(*) from ACTIVITY) > 0 select 'ACTIVITY',/*ACTIVITY*/ * from ACTIVITY where ASI_Favorite_Type = 203 order by DEX_ROW_ID desc if (select count(*) from ADH00100) > 0 select 'ADH00100',/*ADH00100*/ * from ADH00100 where ASI_Favorite_Type = 203 order by DEX_ROW_ID desc if (select count(*) from ADH00101) > 0 select 'ADH00101',/*ADH00101*/ * from ADH00101 where ASI_Favorite_Type = 203 order by DEX_ROW_ID desc if (select count(*) from ADH00102) > 0 select 'ADH00102',/*ADH00102*/ * from ADH00102 where ASI_Favorite_Type = 203 order by DEX_ROW_ID desc if (select count(*) from ADH00103) > 0 select 'ADH00103',/*ADH00103*/ * from ADH00103 where ASI_Favorite_Type = 203 order by DEX_ROW_ID desc if (select count(*) from ADH00104) > 0 select 'ADH00104',/*ADH00104*/ * from ADH00104 where ASI_Favorite_Type = 203 order by DEX_ROW_ID desc if (select count(*) from ADH00105) > 0 select 'ADH00105',/*ADH00105*/ * from ADH00105 where ASI_Favorite_Type = 203 order by DEX_ROW_ID desc --if (select count(*) from ADSK0600) > 0 select 'ADSK0600',/*ADSK0600*/ * from ADSK0600 where ASI_Favorite_Type = 203 order by DEX_ROW_ID desc --if (select count(*) from ALERT3RD) > 0 select 'ALERT3RD',/*ALERT3RD*/ * from ALERT3RD where ASI_Favorite_Type = 203 order by DEX_ROW_ID desc if (select count(*) from ASI00998) > 0 select 'ASI00998',/*ASI00998*/ * from ASI00998 order by DEX_ROW_ID desc if (select count(*) from ASI80100) > 0 select 'ASI80100',/*ASI80100*/ * from ASI80100 order by DEX_ROW_ID desc if (select count(*) from ASI80200) > 0 select 'ASI80200',/*ASI80200*/ * from ASI80200 order by DEX_ROW_ID desc if (select count(*) from ASIEXP100) > 0 select 'ASIEXP100',/*ASIEXP100*/ * from ASIEXP100 order by DEX_ROW_ID desc if (select count(*) from ASIEXP50) > 0 select 'ASIEXP50',/*ASIEXP50*/ * from ASIEXP50 order by DEX_ROW_ID desc if (select count(*) from ASIEXP51) > 0 select 'ASIEXP51',/*ASIEXP51*/ * from ASIEXP51 order by DEX_ROW_ID desc if (select count(*) from ASIEXP60) > 0 select 'ASIEXP60',/*ASIEXP60*/ * from ASIEXP60 where ASI_Favorite_Type = 203 order by DEX_ROW_ID desc if (select count(*) from ASIEXP81) > 0 select 'ASIEXP81',/*ASIEXP81*/ * from ASIEXP81 where ASI_Favorite_Type = 203 order by DEX_ROW_ID desc if (select count(*) from ASIEXP83) > 0 select 'ASIEXP83',/*ASIEXP83*/ * from ASIEXP83 where ASI_Favorite_Type = 203 order by DEX_ROW_ID desc if (select count(*) from ASIEXP85) > 0 select 'ASIEXP85',/*ASIEXP85*/ * from ASIEXP85 where ASI_Favorite_Type = 203 order by DEX_ROW_ID desc if (select count(*) from ASIEXP86) > 0 select 'ASIEXP86',/*ASIEXP86*/ * from ASIEXP86 where ASI_Favorite_Type = 203 order by DEX_ROW_ID desc if (select count(*) from ASIEXP95) > 0 select 'ASIEXP95',/*ASIEXP95*/ * from ASIEXP95 order by DEX_ROW_ID desc if (select count(*) from ASIEXP98) > 0 select 'ASIEXP98',/*ASIEXP98*/ * from ASIEXP98 where ASI_Favorite_Type = 203 order by DEX_ROW_ID desc if (select count(*) from ASIEXP99) > 0 select 'ASIEXP99',/*ASIEXP99*/ * from ASIEXP99 where ASI_Favorite_Type = 203 order by DEX_ROW_ID desc if (select count(*) from ASITAB20) > 0 select 'ASITAB20',/*ASITAB20*/ * from ASITAB20 where ASI_Favorite_Type = 203 order by DEX_ROW_ID desc if (select count(*) from ASITAB30) > 0 select 'ASITAB30',/*ASITAB30*/ * from ASITAB30 order by DEX_ROW_ID desc if (select count(*) from CN01400) > 0 select 'CN01400',/*CN01400*/ * from CN01400 order by DEX_ROW_ID desc if (select count(*) from CN40103) > 0 select 'CN40103',/*CN40103*/ * from CN40103 order by DEX_ROW_ID desc if (select count(*) from CN60100) > 0 select 'CN60100',/*CN60100*/ * from CN60100 order by DEX_ROW_ID desc --if (select count(*) from DB_Upgrade) > 0 select 'DB_Upgrade',/*DB_Upgrade*/ * from DB_Upgrade where ASI_Favorite_Type = 203 order by DEX_ROW_ID desc --if (select count(*) from DDB10000) > 0 select 'DDB10000',/*DDB10000*/ * from DDB10000 where ASI_Favorite_Type = 203 order by DEX_ROW_ID desc --if (select count(*) from DDB10100) > 0 select 'DDB10100',/*DDB10100*/ * from DDB10100 where ASI_Favorite_Type = 203 order by DEX_ROW_ID desc --if (select count(*) from DDB10200) > 0 select 'DDB10200',/*DDB10200*/ * from DDB10200 where ASI_Favorite_Type = 203 order by DEX_ROW_ID desc --if (select count(*) from DDB10300) > 0 select 'DDB10300',/*DDB10300*/ * from DDB10300 where ASI_Favorite_Type = 203 order by DEX_ROW_ID desc --if (select count(*) from DEFLTCOA) > 0 select 'DEFLTCOA',/*DEFLTCOA*/ * from DEFLTCOA where ASI_Favorite_Type = 203 order by DEX_ROW_ID desc --if (select count(*) from DO40100) > 0 select 'DO40100',/*DO40100*/ * from DO40100 where ASI_Favorite_Type = 203 order by DEX_ROW_ID desc --if (select count(*) from DT00100) > 0 select 'DT00100',/*DT00100*/ * from DT00100 where ASI_Favorite_Type = 203 order by DEX_ROW_ID desc --if (select count(*) from DU000010) > 0 select 'DU000010',/*DU000010*/ * from DU000010 where ASI_Favorite_Type = 203 order by DEX_ROW_ID desc --if (select count(*) from DU000020) > 0 select 'DU000020',/*DU000020*/ * from DU000020 where ASI_Favorite_Type = 203 order by DEX_ROW_ID desc --if (select count(*) from DU000030) > 0 select 'DU000030',/*DU000030*/ * from DU000030 where ASI_Favorite_Type = 203 order by DEX_ROW_ID desc --if (select count(*) from duLCK) > 0 select 'duLCK',/*duLCK*/ * from duLCK where ASI_Favorite_Type = 203 order by DEX_ROW_ID desc --if (select count(*) from E1REG) > 0 select 'E1REG',/*E1REG*/ * from E1REG where ASI_Favorite_Type = 203 order by DEX_ROW_ID desc --if (select count(*) from EBSKEYS) > 0 select 'EBSKEYS',/*EBSKEYS*/ * from EBSKEYS where ASI_Favorite_Type = 203 order by DEX_ROW_ID desc if (select count(*) from ECM00201) > 0 select 'ECM00201',/*ECM00201*/ * from ECM00201 order by DEX_ROW_ID desc if (select count(*) from ECM10001) > 0 select 'ECM10001',/*ECM10001*/ * from ECM10001 order by DEX_ROW_ID desc if (select count(*) from ECM10005) > 0 select 'ECM10005',/*ECM10005*/ * from ECM10005 order by DEX_ROW_ID desc if (select count(*) from ECM10110) > 0 select 'ECM10110',/*ECM10110*/ * from ECM10110 order by DEX_ROW_ID desc if (select count(*) from ECM40001) > 0 select 'ECM40001',/*ECM40001*/ * from ECM40001 order by DEX_ROW_ID desc --if (select count(*) from eConnect_Out) > 0 select 'eConnect_Out',/*eConnect_Out*/ * from eConnect_Out where ASI_Favorite_Type = 203 order by DEX_ROW_ID desc --if (select count(*) from EDCVAT01) > 0 select 'EDCVAT01',/*EDCVAT01*/ * from EDCVAT01 where ASI_Favorite_Type = 203 order by DEX_ROW_ID desc --if (select count(*) from EDCVAT10) > 0 select 'EDCVAT10',/*EDCVAT10*/ * from EDCVAT10 where ASI_Favorite_Type = 203 order by DEX_ROW_ID desc --if (select count(*) from EDCVAT19) > 0 select 'EDCVAT19',/*EDCVAT19*/ * from EDCVAT19 where ASI_Favorite_Type = 203 order by DEX_ROW_ID desc --if (select count(*) from ERB10000) > 0 select 'ERB10000',/*ERB10000*/ * from ERB10000 order by DEX_ROW_ID desc --if (select count(*) from ERB10100) > 0 select 'ERB10100',/*ERB10100*/ * from ERB10100 order by DEX_ROW_ID desc --if (select count(*) from ERB10200) > 0 select 'ERB10200',/*ERB10200*/ * from ERB10200 order by DEX_ROW_ID desc --if (select count(*) from ERB10300) > 0 select 'ERB10300',/*ERB10300*/ * from ERB10300 order by DEX_ROW_ID desc --if (select count(*) from ERB10700) > 0 select 'ERB10700',/*ERB10700*/ * from ERB10700 where ASI_Favorite_Type = 203 order by DEX_ROW_ID desc --if (select count(*) from ERB11000) > 0 select 'ERB11000',/*ERB11000*/ * from ERB11000 where ASI_Favorite_Type = 203 order by DEX_ROW_ID desc --if (select count(*) from ERB11100) > 0 select 'ERB11100',/*ERB11100*/ * from ERB11100 where ASI_Favorite_Type = 203 order by DEX_ROW_ID desc --if (select count(*) from ERB11200) > 0 select 'ERB11200',/*ERB11200*/ * from ERB11200 where ASI_Favorite_Type = 203 order by DEX_ROW_ID desc --if (select count(*) from ERB11300) > 0 select 'ERB11300',/*ERB11300*/ * from ERB11300 where ASI_Favorite_Type = 203 order by DEX_ROW_ID desc --if (select count(*) from ERB11500) > 0 select 'ERB11500',/*ERB11500*/ * from ERB11500 where ASI_Favorite_Type = 203 order by DEX_ROW_ID desc --if (select count(*) from ERB11600) > 0 select 'ERB11600',/*ERB11600*/ * from ERB11600 where ASI_Favorite_Type = 203 order by DEX_ROW_ID desc --if (select count(*) from ERB11700) > 0 select 'ERB11700',/*ERB11700*/ * from ERB11700 where ASI_Favorite_Type = 203 order by DEX_ROW_ID desc --if (select count(*) from ERB11800) > 0 select 'ERB11800',/*ERB11800*/ * from ERB11800 where ASI_Favorite_Type = 203 order by DEX_ROW_ID desc --if (select count(*) from ERB12000) > 0 select 'ERB12000',/*ERB12000*/ * from ERB12000 where ASI_Favorite_Type = 203 order by DEX_ROW_ID desc --if (select count(*) from ERB12100) > 0 select 'ERB12100',/*ERB12100*/ * from ERB12100 where ASI_Favorite_Type = 203 order by DEX_ROW_ID desc --if (select count(*) from ERB13000) > 0 select 'ERB13000',/*ERB13000*/ * from ERB13000 where ASI_Favorite_Type = 203 order by DEX_ROW_ID desc --if (select count(*) from ERB20000) > 0 select 'ERB20000',/*ERB20000*/ * from ERB20000 where ASI_Favorite_Type = 203 order by DEX_ROW_ID desc --if (select count(*) from ERB20100) > 0 select 'ERB20100',/*ERB20100*/ * from ERB20100 where ASI_Favorite_Type = 203 order by DEX_ROW_ID desc --if (select count(*) from ERB50100) > 0 select 'ERB50100',/*ERB50100*/ * from ERB50100 where ASI_Favorite_Type = 203 order by DEX_ROW_ID desc --if (select count(*) from ERB90100) > 0 select 'ERB90100',/*ERB90100*/ * from ERB90100 where ASI_Favorite_Type = 203 order by DEX_ROW_ID desc --if (select count(*) from ERB90200) > 0 select 'ERB90200',/*ERB90200*/ * from ERB90200 where ASI_Favorite_Type = 203 order by DEX_ROW_ID desc --if (select count(*) from ERB90300) > 0 select 'ERB90300',/*ERB90300*/ * from ERB90300 where ASI_Favorite_Type = 203 order by DEX_ROW_ID desc --if (select count(*) from ERB90400) > 0 select 'ERB90400',/*ERB90400*/ * from ERB90400 where ASI_Favorite_Type = 203 order by DEX_ROW_ID desc --if (select count(*) from ERB90450) > 0 select 'ERB90450',/*ERB90450*/ * from ERB90450 where ASI_Favorite_Type = 203 order by DEX_ROW_ID desc --if (select count(*) from ERB90500) > 0 select 'ERB90500',/*ERB90500*/ * from ERB90500 where ASI_Favorite_Type = 203 order by DEX_ROW_ID desc --if (select count(*) from EXT00001) > 0 select 'EXT00001',/*EXT00001*/ * from EXT00001 order by DEX_ROW_ID desc --if (select count(*) from EXT80100) > 0 select 'EXT80100',/*EXT80100*/ * from EXT80100 where ASI_Favorite_Type = 203 order by DEX_ROW_ID desc --if (select count(*) from EXT80200) > 0 select 'EXT80200',/*EXT80200*/ * from EXT80200 where ASI_Favorite_Type = 203 order by DEX_ROW_ID desc --if (select count(*) from EXT80300) > 0 select 'EXT80300',/*EXT80300*/ * from EXT80300 where ASI_Favorite_Type = 203 order by DEX_ROW_ID desc --if (select count(*) from EXT80400) > 0 select 'EXT80400',/*EXT80400*/ * from EXT80400 where ASI_Favorite_Type = 203 order by DEX_ROW_ID desc --if (select count(*) from EXT80500) > 0 select 'EXT80500',/*EXT80500*/ * from EXT80500 where ASI_Favorite_Type = 203 order by DEX_ROW_ID desc --if (select count(*) from EXT90101) > 0 select 'EXT90101',/*EXT90101*/ * from EXT90101 where ASI_Favorite_Type = 203 order by DEX_ROW_ID desc --if (select count(*) from EXT90102) > 0 select 'EXT90102',/*EXT90102*/ * from EXT90102 where ASI_Favorite_Type = 203 order by DEX_ROW_ID desc --if (select count(*) from EXT90103) > 0 select 'EXT90103',/*EXT90103*/ * from EXT90103 where ASI_Favorite_Type = 203 order by DEX_ROW_ID desc --if (select count(*) from EXT90104) > 0 select 'EXT90104',/*EXT90104*/ * from EXT90104 where ASI_Favorite_Type = 203 order by DEX_ROW_ID desc --if (select count(*) from EXT90105) > 0 select 'EXT90105',/*EXT90105*/ * from EXT90105 where ASI_Favorite_Type = 203 order by DEX_ROW_ID desc --if (select count(*) from EXT90106) > 0 select 'EXT90106',/*EXT90106*/ * from EXT90106 where ASI_Favorite_Type = 203 order by DEX_ROW_ID desc --if (select count(*) from FA03500) > 0 select 'FA03500',/*FA03500*/ * from FA03500 where ASI_Favorite_Type = 203 order by DEX_ROW_ID desc --if (select count(*) from FAINST01) > 0 select 'FAINST01',/*FAINST01*/ * from FAINST01 where ASI_Favorite_Type = 203 order by DEX_ROW_ID desc --if (select count(*) from FAINST02) > 0 select 'FAINST02',/*FAINST02*/ * from FAINST02 where ASI_Favorite_Type = 203 order by DEX_ROW_ID desc if (select count(*) from GOTO100) > 0 select 'GOTO100',/*GOTO100*/ * from GOTO100 order by DEX_ROW_ID desc if (select count(*) from GOTO200) > 0 select 'GOTO200',/*GOTO200*/ * from GOTO200 order by DEX_ROW_ID desc if (select count(*) from gpCustomerPOSetup) > 0 select 'gpCustomerPOSetup',/*gpCustomerPOSetup*/ * from gpCustomerPOSetup order by DEX_ROW_ID desc --if (select count(*) from GPS_SQL_Error_Codes) > 0 select 'GPS_SQL_Error_Codes',/*GPS_SQL_Error_Codes*/ * from GPS_SQL_Error_Codes order by DEX_ROW_ID desc --if (select count(*) from IC40100) > 0 select 'IC40100',/*IC40100*/ * from IC40100 where ASI_Favorite_Type = 203 order by DEX_ROW_ID desc --if (select count(*) from ICSF0030) > 0 select 'ICSF0030',/*ICSF0030*/ * from ICSF0030 where ASI_Favorite_Type = 203 order by DEX_ROW_ID desc --if (select count(*) from ICSS0030) > 0 select 'ICSS0030',/*ICSS0030*/ * from ICSS0030 where ASI_Favorite_Type = 203 order by DEX_ROW_ID desc --if (select count(*) from LKACTVTY) > 0 select 'LKACTVTY',/*LKACTVTY*/ * from LKACTVTY where ASI_Favorite_Type = 203 order by DEX_ROW_ID desc --if (select count(*) from MC00100) > 0 select 'MC00100',/*MC00100*/ * from MC00100 where ASI_Favorite_Type = 203 order by DEX_ROW_ID desc --if (select count(*) from MC40200) > 0 select 'MC40200',/*MC40200*/ * from MC40200 where ASI_Favorite_Type = 203 order by DEX_ROW_ID desc --if (select count(*) from MC40300) > 0 select 'MC40300',/*MC40300*/ * from MC40300 where ASI_Favorite_Type = 203 order by DEX_ROW_ID desc --if (select count(*) from MC40400) > 0 select 'MC40400',/*MC40400*/ * from MC40400 where ASI_Favorite_Type = 203 order by DEX_ROW_ID desc --if (select count(*) from MC40401) > 0 select 'MC40401',/*MC40401*/ * from MC40401 where ASI_Favorite_Type = 203 order by DEX_ROW_ID desc --if (select count(*) from MC60100) > 0 select 'MC60100',/*MC60100*/ * from MC60100 where ASI_Favorite_Type = 203 order by DEX_ROW_ID desc --if (select count(*) from MC60200) > 0 select 'MC60200',/*MC60200*/ * from MC60200 where ASI_Favorite_Type = 203 order by DEX_ROW_ID desc --if (select count(*) from MESSAGES) > 0 select 'MESSAGES',/*MESSAGES*/ * from MESSAGES where ASI_Favorite_Type = 203 order by DEX_ROW_ID desc --if (select count(*) from NLB10000) > 0 select 'NLB10000',/*NLB10000*/ * from NLB10000 where ASI_Favorite_Type = 203 order by DEX_ROW_ID desc --if (select count(*) from NLB10100) > 0 select 'NLB10100',/*NLB10100*/ * from NLB10100 where ASI_Favorite_Type = 203 order by DEX_ROW_ID desc --if (select count(*) from NLB10200) > 0 select 'NLB10200',/*NLB10200*/ * from NLB10200 where ASI_Favorite_Type = 203 order by DEX_ROW_ID desc --if (select count(*) from NLB10210) > 0 select 'NLB10210',/*NLB10210*/ * from NLB10210 where ASI_Favorite_Type = 203 order by DEX_ROW_ID desc --if (select count(*) from NLB10300) > 0 select 'NLB10300',/*NLB10300*/ * from NLB10300 where ASI_Favorite_Type = 203 order by DEX_ROW_ID desc --if (select count(*) from NLB10400) > 0 select 'NLB10400',/*NLB10400*/ * from NLB10400 where ASI_Favorite_Type = 203 order by DEX_ROW_ID desc --if (select count(*) from NLB10410) > 0 select 'NLB10410',/*NLB10410*/ * from NLB10410 where ASI_Favorite_Type = 203 order by DEX_ROW_ID desc --if (select count(*) from NLB10420) > 0 select 'NLB10420',/*NLB10420*/ * from NLB10420 where ASI_Favorite_Type = 203 order by DEX_ROW_ID desc --if (select count(*) from NLB10600) > 0 select 'NLB10600',/*NLB10600*/ * from NLB10600 where ASI_Favorite_Type = 203 order by DEX_ROW_ID desc --if (select count(*) from NLB10700) > 0 select 'NLB10700',/*NLB10700*/ * from NLB10700 where ASI_Favorite_Type = 203 order by DEX_ROW_ID desc --if (select count(*) from NLB11000) > 0 select 'NLB11000',/*NLB11000*/ * from NLB11000 where ASI_Favorite_Type = 203 order by DEX_ROW_ID desc --if (select count(*) from NLB11100) > 0 select 'NLB11100',/*NLB11100*/ * from NLB11100 where ASI_Favorite_Type = 203 order by DEX_ROW_ID desc --if (select count(*) from NLB11200) > 0 select 'NLB11200',/*NLB11200*/ * from NLB11200 where ASI_Favorite_Type = 203 order by DEX_ROW_ID desc --if (select count(*) from NLB11300) > 0 select 'NLB11300',/*NLB11300*/ * from NLB11300 where ASI_Favorite_Type = 203 order by DEX_ROW_ID desc --if (select count(*) from NLB11500) > 0 select 'NLB11500',/*NLB11500*/ * from NLB11500 where ASI_Favorite_Type = 203 order by DEX_ROW_ID desc --if (select count(*) from NLB11900) > 0 select 'NLB11900',/*NLB11900*/ * from NLB11900 where ASI_Favorite_Type = 203 order by DEX_ROW_ID desc --if (select count(*) from NLB12000) > 0 select 'NLB12000',/*NLB12000*/ * from NLB12000 where ASI_Favorite_Type = 203 order by DEX_ROW_ID desc --if (select count(*) from NLB12100) > 0 select 'NLB12100',/*NLB12100*/ * from NLB12100 where ASI_Favorite_Type = 203 order by DEX_ROW_ID desc --if (select count(*) from NLB12110) > 0 select 'NLB12110',/*NLB12110*/ * from NLB12110 where ASI_Favorite_Type = 203 order by DEX_ROW_ID desc --if (select count(*) from NLB70000) > 0 select 'NLB70000',/*NLB70000*/ * from NLB70000 where ASI_Favorite_Type = 203 order by DEX_ROW_ID desc --if (select count(*) from NLB70100) > 0 select 'NLB70100',/*NLB70100*/ * from NLB70100 where ASI_Favorite_Type = 203 order by DEX_ROW_ID desc --if (select count(*) from ORG00100) > 0 select 'ORG00100',/*ORG00100*/ * from ORG00100 where ASI_Favorite_Type = 203 order by DEX_ROW_ID desc --if (select count(*) from ORG40000) > 0 select 'ORG40000',/*ORG40000*/ * from ORG40000 where ASI_Favorite_Type = 203 order by DEX_ROW_ID desc --if (select count(*) from ORG40100) > 0 select 'ORG40100',/*ORG40100*/ * from ORG40100 where ASI_Favorite_Type = 203 order by DEX_ROW_ID desc --if (select count(*) from PA003502) > 0 select 'PA003502',/*PA003502*/ * from PA003502 where ASI_Favorite_Type = 203 order by DEX_ROW_ID desc --if (select count(*) from pa30000) > 0 select 'pa30000',/*pa30000*/ * from pa30000 where ASI_Favorite_Type = 203 order by DEX_ROW_ID desc --if (select count(*) from pa60101) > 0 select 'pa60101',/*pa60101*/ * from pa60101 where ASI_Favorite_Type = 203 order by DEX_ROW_ID desc --if (select count(*) from paArchiv) > 0 select 'paArchiv',/*paArchiv*/ * from paArchiv where ASI_Favorite_Type = 203 order by DEX_ROW_ID desc --if (select count(*) from paCount) > 0 select 'paCount',/*paCount*/ * from paCount where ASI_Favorite_Type = 203 order by DEX_ROW_ID desc --if (select count(*) from paRcount) > 0 select 'paRcount',/*paRcount*/ * from paRcount where ASI_Favorite_Type = 203 order by DEX_ROW_ID desc --if (select count(*) from PATH) > 0 select 'PATH',/*PATH*/ * from PATH where ASI_Favorite_Type = 203 order by DEX_ROW_ID desc --if (select count(*) from POA40001) > 0 select 'POA40001',/*POA40001*/ * from POA40001 where ASI_Favorite_Type = 203 order by DEX_ROW_ID desc --if (select count(*) from POA40002) > 0 select 'POA40002',/*POA40002*/ * from POA40002 where ASI_Favorite_Type = 203 order by DEX_ROW_ID desc if (select count(*) from SLB10000) > 0 select 'SLB10000',/*SLB10000*/ * from SLB10000 where Smartlist_Number = 203 order by DEX_ROW_ID desc if (select count(*) from SLB10000) > 0 select 'SLB10000',/*SLB10000*/ * from SLB10000 order by SmartList_ID if (select count(*) from SLB10000) > 0 select 'SLB10000',/*SLB10000*/ * from SLB10000 where Smartlist_ID in ('.12') order by DEX_ROW_ID desc if (select count(*) from SLB10100) > 0 select 'SLB10100',/*SLB10100*/ * from SLB10100 where Smartlist_ID in ('.12') order by DEX_ROW_ID desc if (select count(*) from SLB10200) > 0 select 'SLB10200',/*SLB10200*/ * from SLB10200 where Smartlist_ID in ('.12') order by DEX_ROW_ID desc if (select count(*) from SLB10300) > 0 select 'SLB10300',/*SLB10300*/ * from SLB10300 where Smartlist_ID in ('.12') order by DEX_ROW_ID desc if (select count(*) from SLB10400) > 0 select 'SLB10400',/*SLB10400*/ * from SLB10400 where Smartlist_ID in ('.12') order by DEX_ROW_ID desc if (select count(*) from SLB10500) > 0 select 'SLB10500',/*SLB10500*/ * from SLB10500 where Smartlist_ID in ('.12') order by DEX_ROW_ID desc if (select count(*) from SLB10600) > 0 select 'SLB10600',/*SLB10600*/ * from SLB10600 where Smartlist_ID in ('.12') order by DEX_ROW_ID desc if (select count(*) from SLB10700) > 0 select 'SLB10700',/*SLB10700*/ * from SLB10700 where Smartlist_ID in ('.12') order by DEX_ROW_ID desc if (select count(*) from SLB10800) > 0 select 'SLB10800',/*SLB10800*/ * from SLB10800 where Smartlist_ID in ('.12') order by DEX_ROW_ID desc if (select count(*) from SLB10900) > 0 select 'SLB10900',/*SLB10900*/ * from SLB10900 where Smartlist_ID in ('.12') order by DEX_ROW_ID desc if (select count(*) from SLB11000) > 0 select 'SLB11000',/*SLB11000*/ * from SLB11000 where Smartlist_ID in ('.12') order by DEX_ROW_ID desc if (select count(*) from SLB11100) > 0 select 'SLB11100',/*SLB11100*/ * from SLB11100 where Smartlist_ID in ('.12') order by DEX_ROW_ID desc if (select count(*) from SLB11200) > 0 select 'SLB11200',/*SLB11200*/ * from SLB11200 where Smartlist_ID in ('.12') order by DEX_ROW_ID desc if (select count(*) from SLB11300) > 0 select 'SLB11300',/*SLB11300*/ * from SLB11300 where Smartlist_ID in ('.12') order by DEX_ROW_ID desc if (select count(*) from SLB11400) > 0 select 'SLB11400',/*SLB11400*/ * from SLB11400 where Smartlist_ID in ('.12') order by DEX_ROW_ID desc if (select count(*) from SLB11500) > 0 select 'SLB11500',/*SLB11500*/ * from SLB11500 where Smartlist_ID in ('.12') order by DEX_ROW_ID desc if (select count(*) from SLB11600) > 0 select 'SLB11600',/*SLB11600*/ * from SLB11600 where Smartlist_ID in ('.12') order by DEX_ROW_ID desc if (select count(*) from SLB11700) > 0 select 'SLB11700',/*SLB11700*/ * from SLB11700 where Smartlist_ID in ('.12') order by DEX_ROW_ID desc if (select count(*) from SLB11800) > 0 select 'SLB11800',/*SLB11800*/ * from SLB11800 where Smartlist_ID in ('.12') order by DEX_ROW_ID desc if (select count(*) from SLB11900) > 0 select 'SLB11900',/*SLB11900*/ * from SLB11900 where Smartlist_ID in ('.12') order by DEX_ROW_ID desc if (select count(*) from SLB20000) > 0 select 'SLB20000',/*SLB20000*/ * from SLB20000 where Smartlist_ID in ('.12') order by DEX_ROW_ID desc if (select count(*) from SLB80000) > 0 select 'SLB80000',/*SLB80000*/ * from SLB80000 order by DEX_ROW_ID desc if (select count(*) from SLB80300) > 0 select 'SLB80300',/*SLB80300*/ * from SLB80300 order by DEX_ROW_ID desc if (select count(*) from SLB80400) > 0 select 'SLB80400',/*SLB80400*/ * from SLB80400 order by DEX_ROW_ID desc if (select count(*) from SLB90000) > 0 select 'SLB90000',/*SLB90000*/ * from SLB90000 order by DEX_ROW_ID desc --if (select count(*) from STN41100) > 0 select 'STN41100',/*STN41100*/ * from STN41100 where ASI_Favorite_Type = 203 order by DEX_ROW_ID desc --if (select count(*) from STN41200) > 0 select 'STN41200',/*STN41200*/ * from STN41200 where ASI_Favorite_Type = 203 order by DEX_ROW_ID desc --if (select count(*) from STN41250) > 0 select 'STN41250',/*STN41250*/ * from STN41250 where ASI_Favorite_Type = 203 order by DEX_ROW_ID desc --if (select count(*) from STN41300) > 0 select 'STN41300',/*STN41300*/ * from STN41300 where ASI_Favorite_Type = 203 order by DEX_ROW_ID desc --if (select count(*) from STN41350) > 0 select 'STN41350',/*STN41350*/ * from STN41350 where ASI_Favorite_Type = 203 order by DEX_ROW_ID desc
At Stoneridge Software, our team has helped many clients with cases where a SmartList that was currently in use by someone on the team was accidentally deleted by someone. These scripts can be used by anyone with database access for the purpose of not calling on the experts. Another tip here would be to use field-level security to prompt for password for the delete button inside the SmarLlist Builder window. Please use the Contact Us button if you have any questions.
Under the terms of this license, you are authorized to share and redistribute the content across various mediums, subject to adherence to the specified conditions: you must provide proper attribution to Stoneridge as the original creator in a manner that does not imply their endorsement of your use, the material is to be utilized solely for non-commercial purposes, and alterations, modifications, or derivative works based on the original material are strictly prohibited.
Responsibility rests with the licensee to ensure that their use of the material does not violate any other rights.