Insert Excel data into Oracle
I am having the following code in Button-Press-Event for inserting the data from the selected Excel sheet. My problem is only the last row of the Excel file is store in Oracle Table. Others are not at all coming. Anybody having idea on this....?
DECLARE
M_APPID PLS_INTEGER;
M_CONVID PLS_INTEGER;
M_BUFFER VARCHAR2(240);
M_CNT NUMBER;
M_ROW NUMBER;
M_COL NUMBER;
M_ROWID NUMBER := 0;
M_ERROR CHAR;
M_EXCEL_FILE VARCHAR2(2000);
M_EXIT_FLAG CHAR(1);
BEGIN
SET_ITEM_PROPERTY('M_PROCESSING_INFO',VISUAL_ATTRIBUTE,'BP_LOOK');
:M_PROCESSING_INFO := 'Validating file, please wait...';
SYNCHRONIZE;
SET_ITEM_PROPERTY('M_BTN_PREVIEW',ENABLED,PROPERTY_FALSE);
L_VALIDATE_FILE_EXISTENCE;
GO_BLOCK('OW_EXCEL_UPLOAD');
CLEAR_BLOCK(NO_VALIDATE);
GO_BLOCK('OT_EXCEL_ERROR_LOG');
CLEAR_BLOCK;
SET_BLOCK_PROPERTY('OW_EXCEL_UPLOAD',UPDATE_ALLOWED,PROPERTY_FALSE);
SET_BLOCK_PROPERTY('OW_EXCEL_UPLOAD',DELETE_ALLOWED,PROPERTY_FALSE);
SET_BLOCK_PROPERTY('OW_EXCEL_UPLOAD',INSERT_ALLOWED,PROPERTY_TRUE);
GO_ITEM('OW_EXCEL_UPLOAD.OU_ROW_NO');
M_APPID := DDE.APP_BEGIN(M_EXCEL_FILE|| ' '||CHR(34)||:P_TXT_FILE_NAME||CHR(34), DDE.APP_MODE_MINIMIZED);
M_CONVID := DDE.INITIATE('EXCEL', :P_TXT_FILE_NAME);
FIRST_RECORD;
M_CNT := 0;
FOR M_ROW IN :M_START_ROW .. :M_END_ROW LOOP
M_ROWID := M_ROWID + 1;
FOR M_COL IN :M_START_COL .. :M_END_COL LOOP
INSERT INTO TEMP VALUES (M_ROWID, M_COL);
M_BUFFER := '';
M_CNT := M_CNT + 1;
:M_PROCESSING_INFO := 'Processing R'||M_ROW||'C'||M_COL;
SYNCHRONIZE;
DDE.REQUEST(M_CONVID, 'R'||M_ROW||'C'||M_COL, M_BUFFER, DDE.CF_TEXT, 240);
M_BUFFER := RTRIM(LTRIM(M_BUFFER));
M_BUFFER := SUBSTR(M_BUFFER,0,LENGTH(M_BUFFER)-2);
:M_PROCESSING_INFO := 'Processed R'||M_ROW||'C'||M_COL;
SYNCHRONIZE;
IF M_BUFFER IS NULL AND M_COL = 1 THEN
M_EXIT_FLAG := 'Y';
EXIT;
END IF;
COPY(M_ROWID,'OW_EXCEL_UPLOAD.OU_ROW_NO');
BEGIN
IF M_COL = 1 THEN
:EXU_CONT_NO := M_BUFFER;
ELSIF M_COL = 2 THEN
:EXU_LOT_NO := M_BUFFER;
ELSIF M_COL = 3 THEN
:EXU_PART_NO := M_BUFFER;
ELSIF M_COL = 4 THEN
:EXU_QTY := TO_NUMBER(M_BUFFER);
END IF;
EXCEPTION
WHEN OTHERS THEN
L_SAVE_ERROR_LOG(:P_TXT_FILE_NAME,M_ROW,M_BUFFER,L_ERR_DESC(3107));
GO_BLOCK('OT_EXCEL_ERROR_LOG');
EXECUTE_QUERY;
END;
END LOOP;
CREATE_RECORD;
M_CNT := 0;
IF M_EXIT_FLAG = 'Y' THEN
EXIT;
END IF;
END LOOP;
:M_RECORD_CNT := M_ROWID - 1;
DDE.TERMINATE(M_CONVID);
DDE.APP_END(M_APPID);
FIRST_RECORD;
COMMIT;
:M_PROCESSING_INFO := 'Data in the Excel Sheet uploaded into the System.';
SYNCHRONIZE;
GO_BLOCK('OW_EXCEL_UPLOAD');
EXECUTE_QUERY;
END;
Note:
My temp table is having exact number of rows as in Excel sheet.
Have you used the debugger and single stepped through the code to see where the problem is?
Similar Messages
-
Importing excel data into oracle tables
Hello gurus,
Importing excel data into oracle tables..
I know this is the most common question on the thread ...First, i searched the forum, i found bunch of threads with loading data using sqlloader, converting excel into .Txt, tab delimited file, .csv file etc....
Finally i was totally confused in terms how to get this done....
Here is wat i have
- Excel file on local computer.
- i have laod data into dev environment tables(So no risk involved, but want to try something simple)
- Oracle version 11.1.0.7
- Sqlplus and toad (editors)
Here is wat i like to do ....i dont know if its possible
- Without going to unix server can i do everthing on local system by making use of oracle db and sqlplus or toad
SQLLOADER might be one option...but i dont want to go the unix server for placing files and logs and stuff.
Wat will be best and simplest option to do?? and wat format will best to convert from excel into csv, or txt or tab delimited etc.....
If you suggest sqlloader, any code example will be greatly appriciated.
Thank you so much!!!Hi,
user642297 wrote:
Imran,
This is increadible option in toad!!! It works absolutely sweet!! I have toad 9.7 version. IT works great. Thank you so much!!You are welcome :)
Well i have further discussion on this ....this option is great if you doing in staging or development area. What if your doing in prod?? If you automating the sqlloader then how do u do it?? I think we still need to stick with traditional approach of laoding data by making use of SQLLoader right ?? If m wrong please correct me.well, in our case, we do have access to a custom schema in prod where we create the staging table and load the data from datafiles.
try this:
load data
infile 'C:\dest.csv'
into table dest_table
fields terminated by "~" optionally enclosed by '"'
TRAILING NULLCOLS
(name,
owner_nm,
description_column,
UPDT_DT DATE 'MM/DD/YYYY')
{code}
you can get more info about sql loader and your error here:
http://download.oracle.com/docs/cd/B10501_01/server.920/a96652/ch05.htm
http://www.allinterview.com/showanswers/53766.html
And one more quick question ...i found an example of control file , in that i see .dat format file. Is it a data file ?? can i try that option ?? But in excel i didnt see to convert the .dat format file.
Any thoughts ???
It is same as a delimiter text file.
steps to create a .dat file (from a excel file):
1. Insert a column between two columns and populate it with the delimiter (in our case, it is ~)
2. Save the file as unicode text.
3. Open the file in text editor and remove all the tabs (find an replace with blank)
4. Save the file as "DEST.dat". Select encoding as UTF-8 while saving.
5. Your .dat file is ready.
Regards
Imran
Edited by: Imran Soudagar on Apr 22, 2010 10:22 PM -
Steps to insert xml data into oracle
Please give me next steps to insert xml data into oracle 9i:
i've been doing this steps :
1. create folder in oracle port:8080
2. copy xsd into folder
3. register schema
4. Give me next step...
5.
6.
Thanksthis is my complete xmlschema
<?xml version = "1.0" encoding = "UTF-8"?>
<xs:schema xmlns:xs = "http://www.w3.org/2001/XMLSchema">
<xs:element name = "A3A8Vers" type = "xs:string"/>
<xs:element name = "F1F5Vers" type = "xs:string">
</xs:element>
<xs:element name = "sequence" type = "xs:string">
</xs:element>
<xs:element name = "amf" type = "xs:string">
</xs:element>
<xs:element name = "trnsKeyNumber" type = "xs:string">
</xs:element>
<xs:element name = "mac" type = "xs:string">
</xs:element>
<xs:element name = "encryptionKey" type = "xs:string">
</xs:element>
<xs:element name = "signature" type = "xs:string">
</xs:element>
<xs:element name = "signer">
<xs:complexType>
<xs:sequence>
<xs:element ref = "entityNumber"/>
<xs:element ref = "keyNumber"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name = "entityNumber" type = "xs:string">
</xs:element>
<xs:element name = "keyNumber" type = "xs:string">
</xs:element>
<xs:element name = "pblKey">
<xs:complexType>
<xs:sequence>
<xs:element ref = "entityNumber"/>
<xs:element ref = "entityRole"/>
<xs:element ref = "keyNumber"/>
<xs:element ref = "publicKeyVal"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name = "ntrTime" type = "xs:string">
</xs:element>
<xs:element name = "deActionTime" type = "xs:string">
</xs:element>
<xs:element name = "actionTime" type = "xs:string">
</xs:element>
<xs:element name = "entityRole">
<xs:complexType>
<xs:attribute name = "role" default = "INVALID">
<xs:simpleType>
<xs:restriction base = "xs:NMTOKEN">
<xs:enumeration value = "TKD"/>
<xs:enumeration value = "SKD"/>
<xs:enumeration value = "INVALID"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name = "publicKeyVal">
<xs:complexType>
<xs:sequence>
<xs:element ref = "exponent"/>
<xs:element ref = "mod"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name = "exponent" type = "xs:string">
</xs:element>
<xs:element name = "mod" type = "xs:string">
</xs:element>
<xs:element name = "encriptionTransKey" type = "xs:string">
</xs:element>
<xs:element name = "keyType" type = "xs:string">
</xs:element>
</xs:schema>.
I use command to create table :
create table elements of xmltype
xmlschema "http://192.168.1.1:8080/test.xsd"
element "publicKey"
. But why the result,table as object type. so i cant use command "desc <table_name>;" -
Want to load excel data into oracle table with out changing it to CSV
Hello all,
I have a requirement in dumping excel data into oracle database table without changing it to CSV file and this has to be used in normal sql/plsql environment i.e., pkg/procedure cant be used in the forms also...
so, can u guys can help me out in this
thanks.............The link Pavan provided discusses Oracle Heterogeneous Services. This allows you (using ODBC) to create a database link from Oracle to a non-Oracle data source like Excel. This would allow you to query the Excel data source from SQL*Plus or any other client tool. But that is probably going to require that your Oracle database is running on Windows since I'm not aware of any Excel ODBC drivers for Unix.
Another potential option would be to write a Java stored procedure that parsed the file. There are a few different Java libraries that can read and write Excel data files. You could load one of those libraries into the database's JVM and then write Java code that parsed the file. You would then be able to call your Java stored procedure from PL/SQL.
Justin -
Regarding loading of excel data into oracle database
hello,
Can someone help me in knowing that how can we load excel sheets data into oracle database.
I will be really thankful to you.
GursimranHi,
There is tool given by oracle "Oracle Bulk Loader "
you can use this.
But in order use this you need a control file, which specifies how data should be loaded into the database; and a data file, which specifies what data should be loaded.
Example :- this is the control file which has information how the data is processed.
LOAD DATA
INFILE test.dat
INTO TABLE test
FIELDS TERMINATED BY '|'
(i, s)
Example :- test.dat which is the data file or say your excel sheet or document
(1, 'foo')
(2, 'bar')
(3, ' baz')
example of Loading :-
sqlldr <yourName> control=<ctlFile> log=<logFile> bad=<badFile>
sqlldr testing control=test.ctl log=test.log
Thanks
Pavan Kumar N -
How to develope application for converting excel data into oracle database
I am very new to the oracle world. I want to develop application for converting excel sheet into oracle database using oracle forms. I have basic knowldge of oracle but i am totally new to the forms. Can anybody tel me step by step procedure to do this task? Please help me out in this problem.
Thanx in advance.Hello,
just do a "Search" in this forum with words "excell to oracle"... and you could find lot of posts about that, i.e.:
Re: How to load excel-csv file into oracle database
Jose L -
Help needed regarding insertion of data into oracle
Hi,
I am student currently trying to do a project to up a semantic database using oracle. Have set up the semantic technologies for oracle 11gr2 and used the jena adapter to load an owl into oracle.
But i am not sure how do i insert sample data that could reference the owl.
Tried searching but unable to find any simple tutorial and have also looked through the developer's guide and also jenaadaptor guide.
Is there any tutorials available that could help? thank youHi,
Please go to the OTN site for more information:
http://www.oracle.com/technology/tech/semantic_technologies/index.html
There you can find some training info (try the NCI Oracle By Example, it's a good tutorial):
http://www.oracle.com/technology/tech/semantic_technologies/htdocs/semtech_training.html
Regards,
Vladimir -
Insert XML data into oracle table
I want to insert xml data returned by the VB code into oracle table.
As a prequisite I have installed the XDK capabilities for Oracle by installing JServer & running
SQL scripts catxsu.sql,xmlparserv2.jar,load.sql to load the XMLSQL Utility (DBMS_XMLQuery) into the database.
I have also granted following privileges to the user.
Grant users access to XMLParser and XMLDom packages:
grant execute on xmldom to public;
grant execute on xmlparser to public;
create public synonym xmldom for sys.xmldom;
create public synonym xmlparser for sys.xmlparser;
But still i am not able to create procedure which will accept input parameter as an XML document coming from front end which in turn will insert that record into simple oracle table . I am using Oracle 8.1.7
Thanks in advanceWould you specify the database version?
Since DBMS_XMLSave requires DOM, you normally need to divide the huge XML before insertion. -
How to load excel data into oracle table
How do i load data from an excel file with several worksheets into an oracle table?
using Oracle 10g
Excel
sample data of excel
Name eric Name mary
AccountNo 123 AccountNo 321
amount1 5.0 Amount1 1.0
amount2 5.5 Amount2 2.0
amount3 6.0 Amount3 3.0
Total 16.5 Total 6.0
Name larry Name beth
AccountNo 123 AccountNo 321
amount1 5.0 Amount1 1.0
amount2 5.5 Amount2 2.0
amount3 6.0 Amount3 3.0
Total 16.5 Total 6.0
Note: Assume data are aligned into columns like a real excel workbookI have some used something like this.
don't ask any details as I am not a xl person, but i think its pretty straight forword.
hope its helpful for you or someone else
Dim i As Integer
Dim conn As New ADODB.Connection
Dim strInsert As String
Dim strExecInsert As String
conn.ConnectionString = "Provider=MSDAORA.1;User ID=scott;password=tiger;Data Source=orcl.world;Persist Security Info=False"
conn.Open
strInsert = "insert into xlsc ( emp, dept, doj," & _
"dol, dob, Ce ,ED, v_date ) values("
'this is to insert first 2347 rows from xl to orcl
While i < 2348
strExecInsert = strInsert & "'" & _
Trim(Cells(i, 1).Value) & "','" & _
Trim(Cells(i, 2).Value) & "','" & _
Trim(Cells(i, 3).Value) & "','" & _
Trim(Cells(i, 4).Value) & "','" & _
Trim(Cells(i, 5).Value) & "','" & _
Trim(Cells(i, 6).Value) & "','" & _
Trim(Cells(i, 7).Value) & "','" & _
Trim(Cells(i, 8).Value) & "' )"
'MsgBox strExecInsert
If Cells(i, 1).Value <> "" Then
conn.Execute (strExecInsert)
End If
i = i + 1
Wend
'conn.Execute ("commit")
conn.Close
End Sub -
Issue inserting UTF8 data into Oracle in windows environment.
I have a UTF8 PHP application that is writing a string containing special characters to oracle through a ODBC connection. The Oracle database is setup for UTF8 support.
Here is the issue. I have a simple string, "louis de funès". When the data manually moved correctly in UTF8 the data comes up correctly. The Oracle dump() shows:
WORKING DATA:
String: louis de funès
select keywords, dump(keywords, 17) from ame_links where keywords like '%louis de %';
Typ=1 Len=15: l,o,u,i,s, ,d,e, ,f,u,n,c3,a8,s
However, when the same string is Inserted through the PHP application the data shows up in the db like this.
NOT - WORKING:
String: louis de funès
select keywords, dump(keywords, 17) from ame_links where keywords like '%louis de %';
Typ=1 Len=17: l,o,u,i,s, ,d,e, ,f,u,n,c3,83,c2,a8,
(The è character has 4 bytes associated with it)
Windows Setup:
Windows Registry: HKEY_LOCAL_MACHINE -> SOFTWARE -> ORACLE -> HOME0 ->
NLS_LANG=AMERICAN_AMERICA.UTF8
HTTP headers are set for Content-Type:text/html; charset=UTF-8.
Anyone know why I would get 2 extra bytes (83,c2) added in the middle of the è character? Is the oracle client doing some other type of character set conversion before I insert it into the database.
I have also noticed that when I change the NLS_LANG from AMERICAN_AMERICA.UTF8 to AMERICAN_AMERICA.WE8MSWIN1252 that the 4 byte 'è' character works and the 2 byte character doesn't.I reproduced the porblem. Only differnce from yours is that it reproduces regardless the NLS_LANG setting.
Although I cannot be 100% sure, I think what is happening is that Microsoft ODBC Driver Manager converts the insert statement from Windows ACP to Unicode, then calls SQLExecDirectW (WideChar version of SQLExecDirect) of the Oracle ODBC Driver and passes the insert statement in Unicode. Since your PHP code passed the insert statement in UTF-8 encoding, and the Driver Manager converted it from Windows ACP to Unicode, the letter e with grave ("c3,a8" in UTF-8) was wrongly converted to U+00c3, U+00a8 in the Unicode insert statement, then converted to UTF8 ( "c3,83,c2,a8") by Oracle.
By looking at the PHP source code, apparently PHP odbc_exec() function calls ANSI SQLExecDirect().
I tried to verify that the Driver Manager calls SQLExecDirectW() of Oracle ODBC Driver by enabling the ODBC Tracing, but I couldn't make it work. It genetates an emply SQL.LOG file. So my investigation stops here.
IF YOUR METADATA NAMES ARE ASCII ONLY, AND NON-ASCII CHARACTERS APPEAR ONLY IN DATA, you can workaround this problem by binding data. For example,
$stmt = odbc_prepare($conn, "insert into AME_LINKS (keywords, site_id) values (?, ?)");
$rs = odbc_execute($stmt, array($invar,77));
Makoto -
CMP to insert CLOB Data in Oracle
I have a CMP which tries to insert CLOB data into Oracle Database using XMLType column. We have tried multiple options
1. Inserting String data into XMLType column - if the value is more than 4000 chars, it gives an error
2. Inserting CLOB Data into XMLType column - Using the OracleCLob option in the deployment descriptor results in a SQLExcepotion Inconsistent datatype expected number found CLOB.
Can anybody provide a solution to this problem?I have a CMP which tries to insert CLOB data into Oracle Database using XMLType column. We have tried multiple options
1. Inserting String data into XMLType column - if the value is more than 4000 chars, it gives an error
2. Inserting CLOB Data into XMLType column - Using the OracleCLob option in the deployment descriptor results in a SQLExcepotion Inconsistent datatype expected number found CLOB.
Can anybody provide a solution to this problem? -
Need help to upload Excel Chinese data into Oracle
Hello
I am very new at internationalization. We are writing an application that
reads Chinese data from a Microsoft Excel file and writes it out into Oracle
8i. This is what we have done:
1. Use JDBC-ODBC driver to read the Excel data directly from .xls.
2. Write data into oracle database.
When we open Excel, we can view the Chinese characters. When we use SQL
PLus, we see only ????. When we write another servlet to retrieve the data,
it is displayed as ????. The few questions I have are:
1. How can I verify that the Chinese data has been accurately inserted into
the database?
2. Do I need to set anything special (environment variables, config files
etc) in BEA Weblogic 5.1 and Oracle 8i?
The environment we have are:
1. BEA Weblogic SP9 running on WIn NT.
2. Oracle 8i running on Solaris.
ThanksMake sure that the characters are correct in the app server after you get
them out of Oracle and before you put them into the web page. This will help
you determine if the problem is in the JDBC access to Oracle or the encoding
into the web page. Make sure that you verify that the hex values of each
character from the db test case are what you expect.
Peace,
Cameron Purdy
Tangosol Inc.
<< Tangosol Server: How Weblogic applications are customized >>
<< Download now from http://www.tangosol.com/download.jsp >>
"Bernard Ong" <[email protected]> wrote in message
news:[email protected]...
Hi Kev
1. "It doesn't work" means that I still see ??? in the database. WHen I
retrieve the data, it is still displayed as ??? in a browser.
2. Codeset to use to display should be UTF-8.
3. Charset in database server is UTF8. I did a "select * from
database_parameters" to get this value.
4. I copied the Chinese characters from Excel and pasted on Notepad. Icould
see the Chinese characters with the Chinese emulator turned on. WHen Icopy
??? from SQL*Plus and paste it into notepad, I see ???.
Presume:
1. Yes, running SQL*PLUS on BEA machine.
2. BEA machine running on WIndows 200 professional. We downloaded aChinese
emulator. WIndows 2000 is the English version.
Cheers
"Kevin Lu" <[email protected]> wrote in message
news:[email protected]...
Hi Bernard,
Please first clarify:-
1) "It doesn't work" means... cannot display the chinese character as
you
desired?
2) Which codeset that you want it to display, Chinese traditional big5?UTF-8,
i would think it's still in Java/JDBC codeset.
3) What's the charset in the database server? Get help from DBA if you
not
sure
how to obtain this information.
4) Try paste the result(select via SQL*Plus) onto Win Notepad, what's
the
outcome?
Presume:
1) you're running SQL*Plus on your BEA machine?
2) BEA machine is running on Chinese O/S or hv NJStar installed andrunning?
Let me know if i could be of further help.
-Kev
"Bernard Ong" <[email protected]> wrote:
Thanks Kev.
We had changed the registry in the BEA machine to
AMERICAN_AMERICA.UTF8.
THis was done for the Oracle registry in the BEA machine.
Unfortunately,
it
still doesn't work.
Cheers,
Bernard
"Kevin Lu" <[email protected]> wrote in message
news:[email protected]...
Hi Bernard,
I take about the same approach as you while resolving codeset
problem.
So,
first
i make sure SQL*Plus could display my desired result before proceedto
application(be
it Swing, servlet, JSP console etc..). You may try set the NLS_LANGon
your client
machine(same machine as where you run SQL*Plus) to the SAME as
database
server
character set, for instance America_American.US7ASCII. You should
able
to
see
the Chinese characters.
Hope this help with your first question. I can't help for the restanyway.
good luck!
-Kev
"Bernard Ong" <[email protected]> wrote:
Hello
I am very new at internationalization. We are writing an
application
that
reads Chinese data from a Microsoft Excel file and writes it outinto
Oracle
8i. This is what we have done:
1. Use JDBC-ODBC driver to read the Excel data directly from .xls.
2. Write data into oracle database.
When we open Excel, we can view the Chinese characters. When we useSQL
PLus, we see only ????. When we write another servlet to retrievethe
data,
it is displayed as ????. The few questions I have are:
1. How can I verify that the Chinese data has been accurately
inserted
into
the database?
2. Do I need to set anything special (environment variables, configfiles
etc) in BEA Weblogic 5.1 and Oracle 8i?
The environment we have are:
1. BEA Weblogic SP9 running on WIn NT.
2. Oracle 8i running on Solaris.
Thanks -
How to insert more than 32k xml data into oracle clob column
how to insert more than 32k xml data into oracle clob column.
xml data is coming from java front end
if we cannot use clob than what are the different options availableAre you facing any issue with my code?
String lateral size error will come when you try to insert the full xml in string format.
public static boolean writeCLOBData(String tableName, String id, String columnName, String strContents) throws DataAccessException{
boolean isUpdated = true;
Connection connection = null;
try {
connection = ConnectionManager.getConnection ();
//connection.setAutoCommit ( false );
PreparedStatement PREPARE_STATEMENT = null;
String sqlQuery = "UPDATE " + tableName + " SET " + columnName + " = ? WHERE ID =" + id;
PREPARE_STATEMENT = connection.prepareStatement ( sqlQuery );
// converting string to reader stream
Reader reader = new StringReader ( strContents );
PREPARE_STATEMENT.setClob ( 1, reader );
// return false after updating the clob data to DB
isUpdated = PREPARE_STATEMENT.execute ();
PREPARE_STATEMENT.close ();
} catch ( SQLException e ) {
e.printStackTrace ();
finally{
return isUpdated;
Try this JAVA code. -
How to insert data into Oracle db from MySQL db through PHP?
Hi,
I want to insert my MySQL data into Oracle database through PHP.
I can access Mysql database using mysql_conect() & Oracle database using oci_connect() through PHP.
Now How can I insert my data which is in MySQL into Oracle table. Both table structure are exactly same.
So I can use
insert into Oracle_Table(Oracle_columns....) values(Select * from MySQL_Table);
But again problem is I can't open both connections at the same time.
So has anyone done this before or anyone having any other idea..
Plz guide me...You can do it if you setup a ODBC Gateway between MYSQL and Oracle DB. Then you can directly read from MySQL table using DB links and insert into Oracle table in one single SQL Statement.
Otherwise you need to fetch the data from MySQL Into variables in your PHP Program and then insert into Oracle after binding the variables to the insert statement for Oracle. Hope that is clear enough.
Regards
Prakash -
Insert data into oracle table from XML file
I need to insert data into oracle table from XML file
If anybody handled this type of scenario, Please let me know how to insert data into oracle table from XML file
Thanks in advanceThe XML DB forum provides the best support for XML topics related to Oracle.
Here's the FAQ on that forum:
XML DB FAQ
where there are plenty of examples of shredding XML into Oracle tables and such like. ;)
Maybe you are looking for
-
How Can I Display Embedded Equations in PowerPoint?
I am finding that my embedded equations are being stripped from PowerPoint presentations when i show them in the classroom and I am looking for a way to preserve them (I share to the classroom via either Shared Content or My Content). I am using Ma
-
Workitem in universal worklist not refreshed after processing the workitem
Hi, We are using EP 7.0, we are having a problem in refreshing workitem in universal worklist. When a workitem in universal worklist is clicked a ABAP webdynpro application is opened in new window, this window has approve and reject button. Clicking
-
Digitizing live LPs (with some help)
My question begins with Snow Leopard, but probably involves a bit more. Maybe a few people could point me in the right direction. I'm all up to date on my upgrades, but I have a challenge what to do next. I have no problem ripping tracks using a turn
-
This is not the first time that Firefox has disappeared from my computer; however, there was always a version on the mozilla site to download. I can't find one now but expect older versions are still available for download. Can you help me out?
-
[SOLVED] Compiz fusion-icon won't run
Hello, I'm new to Arch Linux and I've just installed it on my laptop. I want to run Compiz on XFCE: I tried the methods on the Arch Wiki (https://wiki.archlinux.org/index.php/Co - icon.22.29) on replacing XFWM with Compiz. The second method doesn't w