QlikView How to check if table exists already

Here is a simple (and fast) one-line code to check in QlikView load script if a table exists already and then drop it:

If (len(TableNumber('Table Name To Check')) > 0) THEN; DROP TABLE [Table Name To Check]; End If  

Note, there is ; after THEN.

TableNumber function returns a number of the table by its name in QlikView data model.

Boris Tyukin

BI, Data Warehousing and ETL

Orlando, Florida