Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
i am trying to ensure no scheduled Salesforce Activities in the future are loaded, but my WHERE clause doesn't seem to be correct. What am I doing wrong?
Activities:
LOAD Id AS ActivityId,
'eCommerce' AS ActivityOrg,
Subject,
ActivityDate AS CalendarDate,
OwnerId,
Description AS eCommercePublicNotes,
Type;
SQL SELECT *
FROM Task
WHERE ActivityDate <= Today();
Today() is a qlikview function. You can't use qlikview functions in SQL statements since those are processed by the dbms and not by qlikview. According to SalesForce.com SOQL and SOSL Reference you can use TODAY instead.
A fieldExpressioncan use a date literal to compare a range of values to the value in adateordateTimefield. Each literal is a range of time beginning with midnight (12:00:00). To find a value within the range, use=. To find values on either side of the range, use>or<. The following table shows the available list of date literals, the ranges they represent, and examples:
Date Literal | Range | Example |
---|---|---|
YESTERDAY | Starts 12:00:00 the day before and continues for 24 hours. | SELECT Id FROM Account WHERE CreatedDate = YESTERDAY |
TODAY | Starts 12:00:00 of the current day and continues for 24 hours. | SELECT Id FROM Account WHERE CreatedDate > TODAY |
Today() is a qlikview function. You can't use qlikview functions in SQL statements since those are processed by the dbms and not by qlikview. According to SalesForce.com SOQL and SOSL Reference you can use TODAY instead.
A fieldExpressioncan use a date literal to compare a range of values to the value in adateordateTimefield. Each literal is a range of time beginning with midnight (12:00:00). To find a value within the range, use=. To find values on either side of the range, use>or<. The following table shows the available list of date literals, the ranges they represent, and examples:
Date Literal | Range | Example |
---|---|---|
YESTERDAY | Starts 12:00:00 the day before and continues for 24 hours. | SELECT Id FROM Account WHERE CreatedDate = YESTERDAY |
TODAY | Starts 12:00:00 of the current day and continues for 24 hours. | SELECT Id FROM Account WHERE CreatedDate > TODAY |
I don't think you can use Today() in a SQL SELECT query. Try something like:
WHERE ActivityDate = #" & format(Date,"mm/dd/yyyy") & "#"