Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
Drop fields fiedsname1,fieldname2 ;
etc
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;
I have more than 20 fields ...will Drop tables '*_temp';
no I don't think your syntax will work, you need to specify all the fields
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
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
Unluckily it doesn't work in my location
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
The link to Stephen's blog works fine for me.