Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I am going to use the following query with resident load, but it gives me syntax error for the following load statement;
[207 Mutual Funds Retail]:
Load "Sales Key",
Sum("SalesUSD") as "Mutual Funds"
Resident [Temp Table 5]
Where "Trans Trade Class" ='S' and ("Product Type" !='DE' or "Product Type"!='PA');
in Sql I have a query like this:
Select sum(Sales) from table 1 where
("Product Type"<>'DE' or "Product Type"<>'PA' or "Product Type"<>'RE' or "Product Type"<>'SA' or "Product Type"<>'CE'
or "Product Type"<>'AA' or "Product Type"<>'VA' or "Product Type"<>'5M' or "Product Type"<>'FA') ;
Thanks,
Sandip
Hello Sandip,
You can make use of below given sample script:
[207 Mutual Funds Retail]:
Load [Sales Key],
Sum(SalesUSD) as [Mutual Funds]
Resident [Temp Table 5]
Where [Trans Trade Class] ='S' and Not Match([Product Type], 'DE', 'PA')
GROUP BY [Sales Key];
Hope this will be helpful.
Regards!
Rahul
Hi,
You have forgot to use Group by, this is needed when you use aggregation in script.
Load "Sales Key",
Sum("SalesUSD") as "Mutual Funds"
Resident [Temp Table 5]
Where "Trans Trade Class" ='S' and ("Product Type" !='DE' or "Product Type"!='PA')
Group by "Sales Key";
Hi Sandip
try this:
[207 Mutual Funds Retail]:
Load "Sales Key",
Sum("SalesUSD") as "Mutual Funds"
Resident [Temp Table 5]
Where "Trans Trade Class" ='S' and ("Product Type" !='DE' or "Product Type"!='PA')
Group by "Sales Key";
What error are you getting?
try below
("Product Type" <>'DE' or "Product Type"<> 'PA')
Group by "Sales Key";
You should also change Your Not valid to !=, use <> instead
Hello Sandip,
You can make use of below given sample script:
[207 Mutual Funds Retail]:
Load [Sales Key],
Sum(SalesUSD) as [Mutual Funds]
Resident [Temp Table 5]
Where [Trans Trade Class] ='S' and Not Match([Product Type], 'DE', 'PA')
GROUP BY [Sales Key];
Hope this will be helpful.
Regards!
Rahul