Excel Query for Salesforce

Discussion of issues, suggestions and bugs of Devart Excel Add-ins, our product line for connecting Excel to external data from cloud applications and databases
Post Reply
refjohn
Posts: 2
Joined: Tue 24 Jan 2017 13:42

Excel Query for Salesforce

Post by refjohn » Tue 24 Jan 2017 14:43

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

Pinturiccio
Devart Team
Posts: 2420
Joined: Wed 02 Nov 2011 09:44

Re: Excel Query for Salesforce

Post by Pinturiccio » Fri 27 Jan 2017 16:16

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.

refjohn
Posts: 2
Joined: Tue 24 Jan 2017 13:42

Re: Excel Query for Salesforce

Post by refjohn » Wed 01 Feb 2017 14:46

Thanks - look forward to hearing in the future....

Post Reply