Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
Does QV where keyword supports 'In' word like it is in SQL?
For example:
Load * from table where Field in (1,2)
Thanks.
Hello,
I'd use one of the following. In case of very few values, Match()
Customers:LOAD *FROM File.qvd (qvd)WHERE Match(CustomerID, 'AAA', 'BBB');
If there are several possibilities or they depend on other field, Exists():
Sales:LOAD *FROM Invoices.qvd (qvd); Customers:LOAD *FROM Customers.qvd (qvd)WHERE Exists(CustomerID); // Will load only those CustomerID present in the Sales table as well
Hope this helps
Hello,
I'd use one of the following. In case of very few values, Match()
Customers:LOAD *FROM File.qvd (qvd)WHERE Match(CustomerID, 'AAA', 'BBB');
If there are several possibilities or they depend on other field, Exists():
Sales:LOAD *FROM Invoices.qvd (qvd); Customers:LOAD *FROM Customers.qvd (qvd)WHERE Exists(CustomerID); // Will load only those CustomerID present in the Sales table as well
Hope this helps
You can have a look at EXISTS function or MATCH function.
Regards, tresesco
You can use IN while fetching data from database
for example:
--------------------------------------------
Load
A,B,C
SQL SELECT *
FROM DB.dbo."Table1"
where upper(status)in('ACTIVE','ABC');
--------------------------------------------
You can not use IN while fetching data from QVD