Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Join us at the Cloud Data and Analytics Tour! REGISTER TODAY
cancel
Showing results for 
Search instead for 
Did you mean: 
julioarriaga
Creator II
Creator 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

1 Solution

Accepted Solutions
fkeuroglian
Partner
Partner

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

View solution in original post

3 Replies
fkeuroglian
Partner
Partner

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

View solution in original post

mikeqlikcloud
Contributor
Contributor

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

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.