Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Experts,
Can any one please help me on below requirement.
I have a table like below
Table1:
Load
Name,
Status
ID,
DATE
From ....
Here how to add the where condition to load only these records.
Name = 'P' , 'A', 'V' and Status = 'Y'
I have tried like below
Table1:
Load
Name,
Status
ID,
DATE
From ....
where Name = 'P' and Name= 'A' and Name = 'V' and Status = 'Y'
Group by ID,DATE;
but fetching 0 records only.
Please let me know am I missed any syntax in where condition.
Thanks in advance.
I think you mean
Where (Name = 'P' Or Name= 'A' Or Name = 'V') And Status = 'Y'
Which could also be written
Where Match(Name, 'P', 'A', 'V') And Status = 'Y'
I think you mean
Where (Name = 'P' Or Name= 'A' Or Name = 'V') And Status = 'Y'
Which could also be written
Where Match(Name, 'P', 'A', 'V') And Status = 'Y'
Try
Table1:
Load
Name,
Status
ID,
DATE
From ....
where (Name = 'P' or Name= 'A' or Name = 'V') and Status = 'Y'
Group by ID,DATE;
I hope this will help you
use
where match(Name,'P','A','V')
and status='Y'
Regards,
and one more thing why you required group by function, if you are not using any aggregation function.??
Regards,
max
Agreed - there is no need for the Group By. In fact Qlik will even throw an error for a Group By without aggregation or with only some of the fields listed.
May be as below:
Where Match(Name, 'P', 'A','V') and Status = 'Y'