Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Dropping Table in script

Hi,

I want to create a dynamic environment, where the schema and table name keeps on  changing.

Issue:

I want to drop a table during partial reload. !

Can this be done ?

Can we write something like:

If(Tables Exists !)

     { Drop it! }

Else

{     Proceed }

Thanks & Regards

Swapneel

1 Solution

Accepted Solutions
pokassov
Specialist
Specialist

Sure

if you have table with name "tab" and want to delete it,  than script will be

if not isnull(TableNumber('tab')) then

     { Drop it! }

Else

{     Proceed }

end if;

View solution in original post

5 Replies
Anonymous
Not applicable
Author

Try defining a variable for your table name

pokassov
Specialist
Specialist

Hello!

You can use this

if not isnull(TableNumber('your table name')) then

Sergey

Not applicable
Author

Hey Sergey,

Didnt follow you exactly, can you please elaborate. ?

Thanks 

Swapneel

pokassov
Specialist
Specialist

Sure

if you have table with name "tab" and want to delete it,  than script will be

if not isnull(TableNumber('tab')) then

     { Drop it! }

Else

{     Proceed }

end if;

Not applicable
Author

Thanks Sergey
It works

Thanks a ton