Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Drop Temp all the Files in the App

Hi All,

I have created several temp Fields in a App.

Like tempabcd, tempbox , tempram , tempmax.

Now I want to drop all the temp Fields with one syntax.

Please help me on the same

11 Replies
avinashelite

Drop fields fiedsname1,fieldname2 ;

etc 

avinashelite

One or several QlikView fields can be dropped from the data model and thus from memory at any time during script execution, by means of a drop field statement.
The syntax is:

drop field[ s ] fieldname [ , fieldname2 ...] [from tablename1 [ , tablename2 ...]]

Both drop field and drop fields are allowed forms with no difference in effect.
If no table is specified, the field will be dropped from all tables where it occurs.

Examples:

drop field A;

drop fields A,B;

drop field A from X;

drop fields A,B from X,Y;

Anonymous
Not applicable
Author

I have more than 20 fields ...will Drop tables '*_temp';

avinashelite

no I don't think your syntax will work, you need to specify all the fields

Gabriel
Partner - Specialist III
Partner - Specialist III

Hi,

May be try this

SUB DropTable(TableName);

   

IF LEFT(TableName,4) ='Temp' THEN

    DROP TABLE [$(TableName)];

ENDIF

END SUB

Then after each table you will have a CALL function as this

CALL DropTable('TempRESULT')

Hopefully this will start a thinking

Peter_Cammaert
Partner - Champion III
Partner - Champion III

The community always supplies you with one or more answers, if you take the time to perform a search.

This one may help you: Qlik Tips: Removing Fields with a Wildcard

Peter

Anonymous
Not applicable
Author

Unluckily it doesn't work in my location

Peter_Cammaert
Partner - Champion III
Partner - Champion III

Yes, I noticed that the link is dead. Weird because it points to the blog of stephen-x.redmond. I also know this to be a QlikView Cookbook for Developers article (by the same author), don't know if you got that one?

I'm sure the site is only temporarily off-line.

Peter

jonathandienst
Partner - Champion III
Partner - Champion III

The link to Stephen's blog works fine for me.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein