Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Create Table if doesnt exist and insert otherwise truncate

My current process is below

 

tSyBaseInput -----> tConvertType ------> tMSSqlOutput

 

Currently my data is loading from one database to another, with a tconverttype inbetween.

The action on the output table is Truncate Table, and Insert Data.

 

I am trying to meet the additional criteria;

1. If Table(output) exists then truncate and insert (Currently working)

2. If Table(output) does not exist then Create Table and Insert

 

And lastly, if there schema for table(output) is different from the tConvert - Drop and Create Table and Insert. 

 

Can anyone point me in the right direction for this?

 

Thanks.

 

Labels (2)
1 Solution

Accepted Solutions
fdenis
Master
Master

you can manage your db structure using system tables.
retrieve table ifo then chose to drop or not.

View solution in original post

1 Reply
fdenis
Master
Master

you can manage your db structure using system tables.
retrieve table ifo then chose to drop or not.