Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Exclude data and them put them in another place

Hello,

I have a database which contains various products sorted by warehouse.

Warehouse A : Phones, laptops, desktops, flatscreens

Warehouse B: Tables, chairs, buildings

Warehouse C: Cars

I want to create a fictive warehouse in Qlikview and call it Warehouse D. In this fictive warehouse I want to store all phones. So I want to remove it from warehouse A and put in in warehouse D without changing my original database,

I'm guesing something like, select * from warehouse where product = NOT phones and then running a different script to put them in the other warehouse?

I've managed to exclude the phones from warehouse A with a script but what's the next step? Next I've created a new codeline where I exclude everything BUT the phones. I don't know how to put that selection as a new Warehouse?

Anyone can help?

1 Solution

Accepted Solutions
johnw
Champion III
Champion III

It sounds like you're just having a syntax problem. Try this:

if(Product='Phones','D',Warehouse) as Warehouse,

View solution in original post

5 Replies
Not applicable
Author

Try this:

WHD:

SQL select * from WHA;

join select * from WHB;

join select * from WHC;

store WHD into WHD.QVD;

drop table WGD;

-Arun

Not applicable
Author

That does not work.

Not applicable
Author

I've tried this also but it does not work:

Load

Product,
Warehouse 'A' as 'D' if(Product='Phones'),
Price

From D:\qlikview\inventory.csv

johnw
Champion III
Champion III

It sounds like you're just having a syntax problem. Try this:

if(Product='Phones','D',Warehouse) as Warehouse,

Not applicable
Author

YES...!

thx John, now it works!