Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

julioarriaga
Contributor II

How do I drop all tables after a Binary Load?

Hi everybody,

I am creating a small txt file from a huge binary model file and I wish to drop all the information of the binary after the txt is generated, so my application has a manageable size. Right now I can't improve the model to make it smaller.

Thanks in advance.

My sample code is the next one (the Set section was ommitted for the sake of clarity):

Capture1.PNG

Tags (1)
1 Solution

Accepted Solutions
Highlighted
Partner
Partner

Re: How do I drop all tables after a Binary Load?

Hi Julio

You can drop your tables only using the DROP TABLE function

After load binary and create your txt, put

Drop table TableName1,TableName2,TableNamexxxx;

Good luck

3 Replies
Highlighted
Partner
Partner

Re: How do I drop all tables after a Binary Load?

Hi Julio

You can drop your tables only using the DROP TABLE function

After load binary and create your txt, put

Drop table TableName1,TableName2,TableNamexxxx;

Good luck

mikeqlikcloud
New Contributor

Re: How do I drop all tables after a Binary Load?

Hi

A dynamic way to drop all tables:

Let myvar = NoOfTables() ;

//Returns the number of tables previously loaded.

FOR x=0 to myvar  ;

if not isnull(TableName( 0 )) then

Let locTable = TableName( 0 ) ;

drop table $(locTable);

end if

next ;

Not applicable

Re: How do I drop all tables after a Binary Load?

One thing to be aware of is the subtle distinction between

DROP TABLE X, Y, Z;

vs

DROP TABLE X;

DROP TABLE Y;

DROP TABLE Z;

The first one above on a single line is more efficient.  Should only be applicable/noticeable for very large data models, but something to be aware of.