function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
gbacskaigbacskai 

query salesforce from PL/SQL

Hi All,

I have made a pl/sql package for salesforce queries. http://code.google.com/p/plsqlsoap/

Simply you can select like this from oracle:

select extractvalue(sf_xml_return,'//sf:Id','xmlns:sf="urn:sobject.enterprise.soap.sforce.com"') Id
from table(OLAP_XMLA_SF5.SF_CALL ('SELECT Id FROM Opportunity'));

I will improve the code with better compression and session handling but now it works for any salesforce replication.

I have tested with Oracle Database 10g Release 10.2.0.1.0 and PL/SQL Release 10.2.0.1.0.

If you have any question and/or feature requests do not hesitate contact me

Have fun
Gergo
gergo@bacskai.hu



Message Edited by gbacskai on 04-29-2008 08:14 AM
cairlinncairlinn
I will definitely try this out and let you know how it goes.
This could be huge - think oracle application express and salesforce.
great job!
gbacskaigbacskai
Salesforce SOAP calls from PL/SQL.

Dear All,

New version added to the repository.
  • General soap calls from salesforce
  • Full Object copy from salesforce to oracle
  • Supported SOAP calls: describeGlobal , describeLayout, describeSObject, describeTabs,getServerTimestamp,getUserInfo,query,queryAll,queryMore
Regards
Gergo
gergo@bacskai.hu

IrfanIrfan

Hello gbacskai

 

This is Irfan, I want to import some data from Oracle database to the salesforce Tables.

1. What may be the procedures applied here to map the tables and fields. 

2. Can we import the data through xml files ?

3. is there any other utility available for importing or exporting data.

 

Thanks in advance,

Irfan Shahid. 

gbacskaigbacskai
Hi Irfan,

1. Yes, You can update, but please first view the next wiki pages: http://wiki.apexdevnet.com/index.php/Sample_SOAP_Messages (enterprise column) and here is an example update from dual:

Code:
SELECT extractvalue(sf_xml_return,'/result/id/text()','xmlns="urn:enterprise.soap.sforce.com"')  id
, extractvalue(sf_xml_return,'/result/success/text()','xmlns="urn:enterprise.soap.sforce.com"') success

from TABLE(SELECT olap_xmla_sf.SF_Generic('update'
,''
,'xmlns="urn:enterprise.soap.sforce.com"'
, '<urn:sObjects xsi:type="urn1:Note">
           <urn1:Id>00220000004Ovk2AAC</urn1:Id>
           <Title>'||D.DUMMY||'</Title>
        </urn:sObjects>')
from DUAL D) x

You can write an oracle trigger for auto update. (please check out the svn again, I made a bugfix on it)

you can use now update,create,delete,merge,undelete

2. If you see it as an oracle table tan yes (see xdb for xml import) or just convert it to the proper salesforce soap message and send it to salesforce.

3. See salesforce app exchange for other tools (like apex data loader)

Regards
Gergo