Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
Not applicable

(Resident Table Drop)Please help me Friends.

Hello Everybody,

                       At First I want to search a specific table and if the table exists I want to drop that table.

                       How to do that please help me.

Thanks & Regards,

Koushik.

4 Replies
chauhans85
Esteemed Contributor

(Resident Table Drop)Please help me Friends.

control+e

control+ f

type tablename

load * ,

1 as junk

resident tablename;

drop table tablename;

Not applicable

(Resident Table Drop)Please help me Friends.

Sir,

    I do not want to drop it manually.I want to write a script like that whenever it will load the script

    autometically it will search for the hardcoaded table name and if exists it will be droped.

     What will be the code and flow of script?

     Please help me again.

Thanking you.

Koushik.

Not applicable

(Resident Table Drop)Please help me Friends.

Hi,

Use this script

let numTables = NoOfTables();

for i=1 to $(numTables)

let tt = TableName(0);

if tt = 'YOUR TABLE' THEN 

drop table [$(tt)];

END IF

next

SEARCH THE REF MANUAL FOR THE IF STATEMENT SCRIPT ON PAGE 311

Not applicable

Re: (Resident Table Drop)Please help me Friends.

Hi,

Please see if the attached sample can help you.

Tab1:

Load * Inline [

A

1

2

3

4

5

];

Tab2:

Load * Inline [

B

7

8

9

0

];

//You please harcode the table here - 'Tab2' in the function below TableNumber

LET vTabNum = TableNumber('Tab2');

if vTabNum <> Null() then

    Drop Table Tab2;

end if

Cheers.

Community Browser