Help get this topic noticed by sharing it on Twitter, Facebook, or email.
I’m confused

Nothing Happens when I Update a DateTime using OpenQuery...

Hello,

I'm a bit new to DbAmp so I apologize if my question is obtuse.

I'm trying to update a custom date time field of our Salesforce org's ContentVersion object using an Update/OpenQuery approach. The query runs successfully (i.e. no errors) but the update operation doesn't seem to actually update anything (the value of the targeted field doesn't change). Am I doing something wrong? See the SQL script below:

--Target field isn't updated with this approach
update openquery( salesforce, 'Select Id, Date_Sent_to_Partner__c from ContentVersion where Id=''{Salesforce Id}'' ' ) set Date_Sent_to_Partner__c = GetDate()

If I use the following straight SQL approach with the same credentials, it works successfully (even though it takes a REALLY long time):

--Target field is updated with this approach
update salesforce...ContentVersion
set Date_Sent_to_Partner__c = GetDate()
where Id = '{SalesForce Id}'

Thanks in advance!
1 person has
this problem
+1
Reply