Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Guys,
I am having issue with using where in the script. If I comment the Where statement I get data and if I add it no data will show on the table.
I noticed that the issue is in the and in the where statement..but not sure how to fix
ActualYTDBalance:
Load
Year,
Period,
Name,
Sum(AmountYTD) as Amount
Resident AA2
where Name='1100' and Name='1105'
Group by Year,Period,Name;
Let me know if you can help!
Best,
Badr
Hi Badr,
it's an OR, the field can have only one value per record:
where (Name='1100' or Name='1105')
- Ralf
Hi Badr,
it's an OR, the field can have only one value per record:
where (Name='1100' or Name='1105')
- Ralf
Hi
Edit:
ActualYTDBalance:
Load
Year,
Period,
Name,
Sum(AmountYTD) as Amount
Resident AA2
where Match(Name,'1100','1105')
Group by Year,Period,Name;
If you use AND function, it does not display any value because, a single row contain single name
Hi,
Instead of OR you are using AND condition, because a Name field cannot have two values at a time.
ActualYTDBalance:
Load
Year,
Period,
Name,
Sum(AmountYTD) as Amount
Resident AA2
where (Name='1100' OR Name='1105')
Group by Year,Period,Name;
Hope this helps you.
Regards,
Jagan.
Try this One, May this will help you
ActualYTDBalance:
Load
Year,
Period,
Name,
Sum(AmountYTD) as Amount
Resident AA2
where Match(Name,'1100','1105')
Group by Year,Period,Name;
Thank you guys! I totally missed the and , or differences