HI,
Testing the Excel Add-on for Salesforce and finding it useful. However not an SQL expert and although I can read and make minor edits, have hit a brick wall. Have the query below which brings me, what we call, neglected Opportunities prior to 1st January - in that there is no obvious notes been made on account since that date.
I would like the date to be dynamic in that it is always 30 days prior to 'today' so when report runs it filters anything with modified or updates in last 30 days. COudl anyone advise on the code to use?
SELECT t.Id,
t.Name,
t.StageName,
t.Amount,
t.CloseDate,
t.NextStep,
t.Op_URL__c,
AccountId.Name AS "AccountId.Name",
OwnerId.FirstName AS "OwnerId.FirstName"
FROM Opportunity AS t
LEFT OUTER JOIN Account AS AccountId ON t.AccountId = AccountId.Id
INNER JOIN User AS OwnerId ON t.OwnerId = OwnerId.Id
WHERE ((t.LastActivityDate < '2017-01-01' AND t.LastModifiedDate < '2017-01-01 12:14:47') AND (t.IsClosed != True))
ORDER BY t.CloseDate
Excel Query for Salesforce
-
- Devart Team
- Posts: 2420
- Joined: Wed 02 Nov 2011 09:44
Re: Excel Query for Salesforce
At the moment Excel Add-ins does not support such feature. We will investigate the possibility to support relative constant in the filter for date datatypes. These constants will be dynamically calculated each time when a query runs. For example, a constant that means the current day.
We will post here when we get any results.
We will post here when we get any results.
Re: Excel Query for Salesforce
Thanks - look forward to hearing in the future....