ohmetw
asked on
need to update mySQL table with data from Oracle table. need code in mySQL procedure or script
I need to run a scheduled job to update data in a mySQL database, and must query an ORACLE database to get values for the update.
I am very comfortable coding pl/SQL and would like to just create a procedure in mySQL to query the ORACLE table....basically in this form
UPDATE mySQLdb.table
SET <mySQLdb.table.fieldtoupda te> = (
SELECT <ORACLEdb.table.fieldtoget >
FROM <ORACLEdb.table>
WHERE <ORACLEdb.table.id> = <mySQLdb.table.id>)
WHERE mySQLdb.table.fieldtoupdat e is NULL;
can I connect to another db from within a mySQL procedure, or do I need to use some different method. Looking for some expert guidance and examples if possible :-)
*Note, I know it's possible to create a database link in ORACLE but there's a lot of red tape for me to embed code in ORACLE as opposed to just querying from mySQL or external
I am very comfortable coding pl/SQL and would like to just create a procedure in mySQL to query the ORACLE table....basically in this form
UPDATE mySQLdb.table
SET <mySQLdb.table.fieldtoupda
SELECT <ORACLEdb.table.fieldtoget
FROM <ORACLEdb.table>
WHERE <ORACLEdb.table.id> = <mySQLdb.table.id>)
WHERE mySQLdb.table.fieldtoupdat
can I connect to another db from within a mySQL procedure, or do I need to use some different method. Looking for some expert guidance and examples if possible :-)
*Note, I know it's possible to create a database link in ORACLE but there's a lot of red tape for me to embed code in ORACLE as opposed to just querying from mySQL or external
ASKER
ok, I do not know how to do that, and keep in mind I can not embed script in the ORACLE side 'database links' I can only operate from the mySQL side
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
If so, how ?
If not, let you begin that way.