+ Start a Discussion
NehaaNehaa 

DB Amp - Cannot pull in the field using a soql query

Hi,

 

We have DB Amp connection with our salesforce production. when i write a soql query in sql server, am not able to pull in one field information. I do have access on that field.

 

Query:

 

Select *
From openquery(SALESFORCE,
'SELECT
Id,

..

..

..

.
Credit_Account__c

FROM Opportunity 
WHERE (CreatedDate=YESTERDAY)')

 

Error : 

OLE DB provider "DBAmp.DBAmp" for linked server "SALESFORCE" returned message "Error 2033 : Field Credit_Account__c is not valid for object Opportunity.".
Msg 7350, Level 16, State 2, Line 1
Cannot get the column information from OLE DB provider "DBAmp.DBAmp" for linked server "SALESFORCE".

 

I am pretty sure that this field belongs to opportunity object.

 

Please help me in figuring out this. Its urgent.

 

many thanks!!

Vinita_SFDCVinita_SFDC

Hi Nehaa,

 

Can you run following query on salesforce Org through workbench/force.com IDE to verify that the query is working properly and returning expected results.

 

'SELECT
Id,

..

..

..

.
Credit_Account__c

FROM Opportunity 
WHERE (CreatedDate=YESTERDAY)'

NehaaNehaa
Yes, I have tried this and this is not pulling the credit account details. it throws me an error. what would be the reason behind this?
Vinita_SFDCVinita_SFDC

Hi Nehaa,

 

Query seems fine, please check if the field name Credit_Account__c is correct and it belongs to Opportunity object. If verifying field details doesn't resolve issues, then share error message.

NehaaNehaa
Yes everything is correct. I need to mention this, this field is not on the page layout. would it be the reason for this?? any thoughts?
Vinita_SFDCVinita_SFDC

Hi Nehaa,

 

In private message please send me the affected Org ID.