You need to sign in to do that
Don't have an account?
Andre Largie 1
using an OR statement
Hi,
I'm having a hard time creating a SAQL statement that will allow me to match records that contain one of many string values. I'm trying to filter on records that contain "scratch" or "cut" in the notes. Any suggestions? Thanks in advance.
The following statement won't work for me:
q = load "All_Baby_Salesforce";
q = filter q by 'SAP_Notes_Internal' matches ["scratch" || "cut" ];
q = group q by all;
q = foreach q generate unique('CP_ID') as 'unique_CP_ID';
q = limit q 2000;
I'm having a hard time creating a SAQL statement that will allow me to match records that contain one of many string values. I'm trying to filter on records that contain "scratch" or "cut" in the notes. Any suggestions? Thanks in advance.
The following statement won't work for me:
q = load "All_Baby_Salesforce";
q = filter q by 'SAP_Notes_Internal' matches ["scratch" || "cut" ];
q = group q by all;
q = foreach q generate unique('CP_ID') as 'unique_CP_ID';
q = limit q 2000;
q = load "All_Baby_Salesforce";
q = filter q by 'SAP_Notes_Internal' matches "scratch" or 'SAP_Notes_Internal' matches "cut" ;
q = group q by all;
q = foreach q generate unique('CP_ID') as 'unique_CP_ID';
q = limit q 2000;
My own test with training datasets:
q = load "case";
q = foreach q generate 'Account.Industry' as 'Account.Industry', 'Account.Name' as 'Account.Name';
q = filter q by 'Account.Name' matches "Duncan" or 'Account.Name' matches "Grant" ;
q = limit q 100;
https://developer.salesforce.com/docs/atlas.en-us.bi_dev_guide_saql.meta/bi_dev_guide_saql/bi_saql_operators_comparison.htm
This studio is free and there are many questions about SAQL on this forum.