How to delete a large data lookup table

Primary tabs

Hello,

I have a large Data Lookup Table (> 150,000 records). It is too large to be opened from Ensemble --> Configure --> Data Lookup Tables to be deleted.

Is there another way that I can delete this table?

Thank you.

 

Answers

You could do it with an SQL query:

DELETE FROM Ens_Util.LookupTable WHERE TableName = '<name of table>'

You can create the query either via the Management Console (System Explorer | SQL | Execute Query tab) or from the SQL Shell

JEFF>d $system.SQL.Shell()
SQL Command Line Shell
----------------------------------------------------
 
The command prefix is currently set to: <<nothing>>.
Enter q to quit, ? for help.
JEFF>>delete from Ens_Util.LookupTable where TableName = 'facLookup'
1.      delete from Ens_Util.LookupTable where TableName = 'facLookup'
 
3 Rows Affected
statement prepare time(s)/globals/lines/disk: 0.1893s/11322/125529/16ms
          execute time(s)/globals/lines/disk: 0.0021s/29/408/0ms
                          cached query class: %sqlcq.JEFF.cls27
---------------------------------------------------------------------------

Do ##class(Ens.Util.LookupTable).%ClearTable(tableName)

And if just want to delete. it can be done from Studio as well

Its in the "Other" section