Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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!
Hi @emyemyemy, try with: and not Exists('sqlproduct', product);
Hi @emyemyemy, try with: and not Exists('sqlproduct', product);
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 !
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
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 );
Thank you for help , It misses only the ( '' ) : and not Exists('sqlproduct',product );
Hi Ruben !
I had problem with my DB , It works perfectly thank you for help .