Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello
I have a query which should fetch results from salesforce on the basis of below WHERE clause :
Select xyz
FROM xyz
WHERE StartDateTime >= TODAY AND StartDateTime <= NEXT_N_DAYS:3
Note: For (TODAY) I suppose I will have to use getDate() & for NEXT_N_DAYS:3 I will have to use addDate() and pass them at runtime.
My question is how do I use the this functions in my SOQL Query to fetch desired output. I tried using global variables and context variables but faced different technical issues related to type conversion.
Now, I am unsure of the approach I will have to use. Can anyone confirm the ideal way of doing this task. In case I have a confirmed approach, I will stick to it and try to resolve the technical challenges.
Please let me know If the question is unclear.
Thanks @TRF
I understood the second part of your reply. However as stated
"The best and simplest solution is to use standard salesforce literals such as TODAY, NEXT_N_DAYS or others as soon as the condition is always the same."
Are you saying that if If I run the below query in tSalesforceinput, It will work in Talend?
Please excuse if it is a silly question since I am not very familiar with SOQL.
SELECT
Event.id,
Event.Account.Name,
Event.Account.telephoneMobile__c
FROM Event
WHERE StartDateTime >= TODAY AND StartDateTime <= NEXT_N_DAYS:3
AND codeMagasin__c in ('0062', '0374', '0368', '0041')
@rohitpatil1993 did you try? does it works as expected?
If so, thanks to mark your case as solved.
Thank you very much @TRF
It worked when I used the SOQL as it is in tSalesforceinput.