Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikWorld online is next week! REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
emyemyemy
Contributor III
Contributor III

Get Excel column list that it's value doesn't exist in SQl column

I want to select the products from my excel column 'ExcelProduct' that are not exist in my sql column  SqlProduct:

I tried this : 

sql
select product as sqlproduct
from `DB`.`Table`  group by  product;

let vProductlist= peek('sqlproduct');

LOAD product as excelProduct,date,CC
[D:\\All Documents\file.xlsx]
(ooxml, embedded labels, table is sheet)

where date=today(1) AND CC='360' and not Exists(product,$(vProductlist));

 

I tried to use  not in ($(vProductlist)) but it's only  works with sql query  !

 

Thank you for any help or attention!

 

1 Solution

Accepted Solutions
rubenmarin

Hi @emyemyemy, try with: and not Exists('sqlproduct', product);

View solution in original post

6 Replies
rubenmarin

Hi @emyemyemy, try with: and not Exists('sqlproduct', product);

emyemyemy
Contributor III
Contributor III
Author

Hi Ruben !

It gives  me all  count productExcel  ignoring  the condition  'CC='360' :

I have  5 productExcel where CC=360 and 2 productExcel=361  the result shows  7 for count(productExcel) ignoring the where CC=360 while it takes  today's date !

,I can't figure out !

I want to limit my result on specific productExcel that are not exist in my productsql list where CC='360'!

Thank you for your help  !

marcus_sommer
MVP & Luminary
MVP & Luminary

Try it in this way:

sql select product from `DB`.`Table` group by product;

LOAD product,date,CC from [D:\\All Documents\file.xlsx]
(ooxml, embedded labels, table is sheet)
where date=today(1) AND CC='360' and not Exists(product);

- Marcus

MayilVahanan

Hi @emyemyemy 

Try like below

Sql
select product as sqlproduct
from `DB`.`Table`  group by  product;

LOAD product as excelProduct,date,CC
[D:\\All Documents\file.xlsx]
(ooxml, embedded labels, table is sheet)

where date=today(1) AND CC='360' and not Exists(sqlproduct,product );

Thanks & Regards,
Mayil Vahanan R
emyemyemy
Contributor III
Contributor III
Author

Thank you for help , It misses  only  the ( '' )   :   and not Exists('sqlproduct',product );

emyemyemy
Contributor III
Contributor III
Author

Hi Ruben !

I had problem with my DB  , It works perfectly thank you for help .