How to import csv data into Oracle using c#
Hello,
How to import csv data into Oracle using c #. Where data to be imported 3GB in size and number of rows 7512263. I've managed to import csv data into Oracle, but the time it takes about 1 hour. How to speed up the time it takes to import csv data into oracle. Thank you.
This is my code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Diagnostics;
using System.Threading;
using System.Text.RegularExpressions;
using System.IO;
using FileHelpers;
using System.Data.OracleClient;
namespace sqlloader
class Program
static void Main(string[] args)
int jum;
int i;
bool isFirstLine = false;
FileHelperEngine engine = new FileHelperEngine(typeof(XL_XDR));
//Connect To Database
string constr = "Data Source=(DESCRIPTION=(ADDRESS_LIST="
+ "(ADDRESS=(PROTOCOL=TCP)(HOST= pt-9a84825594af )(PORT=1521 )))"
+ "(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=o11g)));"
+ "User Id=xl;Password=rahasia;";
OracleConnection con = new OracleConnection(constr);
con.Open();
// To Read Use:
XL_XDR[] res = engine.ReadFile("DataOut.csv") as XL_XDR[];
jum = CountLinesInFile("DataOut.csv");
FileInfo f2 = new FileInfo("DataOut.csv");
long s2 = f2.Length;
int jmlRecord = jum - 1;
for (i = 0; i < jum; i++)
ShowPercentProgress("Processing...", i, jum);
Thread.Sleep(100);
if (isFirstLine == false)
isFirstLine = true;
else
string sql = "INSERT INTO XL_XDR (XDR_ID, XDR_TYPE, SESSION_START_TIME, SESSION_END_TIME, SESSION_LAST_UPDATE_TIME, " +
"SESSION_FLAG, VERSION, CONNECTION_ROW_COUNT, ERROR_CODE, METHOD, HOST_LEN, HOST, URL_LEN, URL, CONNECTION_START_TIME, " +
"CONNECTION_LAST_UPDATE_TIME, CONNECTION_FLAG, CONNECTION_ID, TOTAL_EVENT_COUNT, TUNNEL_PAIR_ID, RESPONSIVENESS_TYPE, " +
"CLIENT_PORT, PAYLOAD_TYPE, VIRTUAL_TYPE, VID_CLIENT, VID_SERVER, CLIENT_ADDR, SERVER_ADDR, CLIENT_TUNNEL_ADDR, " +
"SERVER_TUNNEL_ADDR, ERROR_CODE_2, IPID, C2S_PKTS, C2S_OCTETS, S2C_PKTS, S2C_OCTETS, NUM_SUCC_TRANS, CONNECT_TIME, " +
"TOTAL_RESP, TIMEOUTS, RETRIES, RAI, TCP_SYNS, TCP_SYN_ACKS, TCP_SYN_RESETS, TCP_SYN_FINS, EVENT_TYPE, FLAGS, TIME_STAMP, " +
"EVENT_ID, EVENT_CODE) VALUES (" +
"'" + res.XDR_ID + "', '" + res[i].XDR_TYPE + "', '" + res[i].SESSION_START_TIME + "', '" + res[i].SESSION_END_TIME + "', " +
"'" + res[i].SESSION_LAST_UPDATE_TIME + "', '" + res[i].SESSION_FLAG + "', '" + res[i].VERSION + "', '" + res[i].CONNECTION_ROW_COUNT + "', " +
"'" + res[i].ERROR_CODE + "', '" + res[i].METHOD + "', '" + res[i].HOST_LEN + "', '" + res[i].HOST + "', " +
"'" + res[i].URL_LEN + "', '" + res[i].URL + "', '" + res[i].CONNECTION_START_TIME + "', '" + res[i].CONNECTION_LAST_UPDATE_TIME + "', " +
"'" + res[i].CONNECTION_FLAG + "', '" + res[i].CONNECTION_ID + "', '" + res[i].TOTAL_EVENT_COUNT + "', '" + res[i].TUNNEL_PAIR_ID + "', " +
"'" + res[i].RESPONSIVENESS_TYPE + "', '" + res[i].CLIENT_PORT + "', '" + res[i].PAYLOAD_TYPE + "', '" + res[i].VIRTUAL_TYPE + "', " +
"'" + res[i].VID_CLIENT + "', '" + res[i].VID_SERVER + "', '" + res[i].CLIENT_ADDR + "', '" + res[i].SERVER_ADDR + "', " +
"'" + res[i].CLIENT_TUNNEL_ADDR + "', '" + res[i].SERVER_TUNNEL_ADDR + "', '" + res[i].ERROR_CODE_2 + "', '" + res[i].IPID + "', " +
"'" + res[i].C2S_PKTS + "', '" + res[i].C2S_OCTETS + "', '" + res[i].S2C_PKTS + "', '" + res[i].S2C_OCTETS + "', " +
"'" + res[i].NUM_SUCC_TRANS + "', '" + res[i].CONNECT_TIME + "', '" + res[i].TOTAL_RESP + "', '" + res[i].TIMEOUTS + "', " +
"'" + res[i].RETRIES + "', '" + res[i].RAI + "', '" + res[i].TCP_SYNS + "', '" + res[i].TCP_SYN_ACKS + "', " +
"'" + res[i].TCP_SYN_RESETS + "', '" + res[i].TCP_SYN_FINS + "', '" + res[i].EVENT_TYPE + "', '" + res[i].FLAGS + "', " +
"'" + res[i].TIME_STAMP + "', '" + res[i].EVENT_ID + "', '" + res[i].EVENT_CODE + "')";
OracleCommand command = new OracleCommand(sql, con);
command.ExecuteNonQuery();
Console.WriteLine("Successfully Inserted");
Console.WriteLine();
Console.WriteLine("Number of Row Data: " + jmlRecord.ToString());
Console.WriteLine();
Console.WriteLine("The size of {0} is {1} bytes.", f2.Name, f2.Length);
con.Close();
static void ShowPercentProgress(string message, int currElementIndex, int totalElementCount)
if (currElementIndex < 0 || currElementIndex >= totalElementCount)
throw new InvalidOperationException("currElement out of range");
int percent = (100 * (currElementIndex + 1)) / totalElementCount;
Console.Write("\r{0}{1}% complete", message, percent);
if (currElementIndex == totalElementCount - 1)
Console.WriteLine(Environment.NewLine);
static int CountLinesInFile(string f)
int count = 0;
using (StreamReader r = new StreamReader(f))
string line;
while ((line = r.ReadLine()) != null)
count++;
return count;
[DelimitedRecord(",")]
public class XL_XDR
public string XDR_ID;
public string XDR_TYPE;
public string SESSION_START_TIME;
public string SESSION_END_TIME;
public string SESSION_LAST_UPDATE_TIME;
public string SESSION_FLAG;
public string VERSION;
public string CONNECTION_ROW_COUNT;
public string ERROR_CODE;
public string METHOD;
public string HOST_LEN;
public string HOST;
public string URL_LEN;
public string URL;
public string CONNECTION_START_TIME;
public string CONNECTION_LAST_UPDATE_TIME;
public string CONNECTION_FLAG;
public string CONNECTION_ID;
public string TOTAL_EVENT_COUNT;
public string TUNNEL_PAIR_ID;
public string RESPONSIVENESS_TYPE;
public string CLIENT_PORT;
public string PAYLOAD_TYPE;
public string VIRTUAL_TYPE;
public string VID_CLIENT;
public string VID_SERVER;
public string CLIENT_ADDR;
public string SERVER_ADDR;
public string CLIENT_TUNNEL_ADDR;
public string SERVER_TUNNEL_ADDR;
public string ERROR_CODE_2;
public string IPID;
public string C2S_PKTS;
public string C2S_OCTETS;
public string S2C_PKTS;
public string S2C_OCTETS;
public string NUM_SUCC_TRANS;
public string CONNECT_TIME;
public string TOTAL_RESP;
public string TIMEOUTS;
public string RETRIES;
public string RAI;
public string TCP_SYNS;
public string TCP_SYN_ACKS;
public string TCP_SYN_RESETS;
public string TCP_SYN_FINS;
public string EVENT_TYPE;
public string FLAGS;
public string TIME_STAMP;
public string EVENT_ID;
public string EVENT_CODE;
I hope someone can give me a solution. Thanks
The fastest way is to use external tables or sql loader (sqlldr). (If you use external tables or sql loader, you don't use C# at all).
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 -
How to import legacy data into apex tables
Hi All,
Please tell me How to import legacy data into apex tables.
Thanks&Regards,
RaghuSQL WorkshopUtilitiesData Workshop...
you can import the data from already exported as (text/csv/xml) data
Note: the table name and column name should be equal if the table already Existing table. -
Background:
I have a class called SUS_WindowsComputerMP, that is an extension of the Microsoft class, Microsoft.Windows.Computer
I'm trying to import CSV data into this extended class and to the base class as well.
Question:
What am I doing wrong? I have a feeling that the Import CSV Format file is different for importing data into *extended* classes like mine, because the XML structure below would work for non-extended classes.
"...Creating new CSVImporter
Data Filename: D:\Peter\CMDB II\Exported MPs\TestMPs\SUS_WindowsComputer.csv
Format Filename: D:\Peter\CMDB II\Exported MPs\SUS_WindowsComputerMP.xml
Validating against XSD schema...
The 'ManagementPack' element is not declared.
Validation completed.
Format file D:\Peter\CMDB II\Exported MPs\SUS_WindowsComputerMP.xml contains an invalid root element. Expected: root node with name \"CSVImportFormat\"
Could not initialize a Management Object Creator from format file D:\Peter\CMDB II\Exported MPs\SUS_WindowsComputerMP.xml. Import thread exiting.
My import format XML is this:
<CSVImportFormat>
<Class Type="ClassExtension_a3ae3e0f_d578_43dc_aa3e_9037a094763c" >
<Property ID="WindowsServerID" />
<Property ID="PrincipalName" />
<Property ID="NetbiosComputerName" />
<Property ID="IPAddress" />
<Property ID="NetbiosDomainName" />
<Property ID="DNSName" />
<Property ID="OSVersionDisplayName" />
<Property ID="SerialNo" />
<Property ID="ServerDescription" />
<Property ID="AssetTagNo" />
<Property ID="ServerNameRow" />
<Property ID="ChassisType" />
<Property ID="InstallDate" />
<Property ID="IsVirtualMachine" />
<Property ID="BusinessUnitCustomersEnum" />
<Property ID="RegionLocationEnum" />
<Property ID="OtherFunctionRoleEnum" />
<Property ID="ProductTypeEnum" />
<Property ID="ObjectStatus" />
<Property ID="AssetStatus" />
<Property ID="CriticalityEnum" />
<Property ID="EnvironmentEnum" />
<Property ID="CostCodeClassEnum" />
<Property ID="DataClassificationEnum" />
<Property ID="Manufacturer" />
</Class>
</CSVImportFormat>Hello,
Can anyone please help me out with this weird issue.
thanks,
orton -
How to write the data into EEPROM using Labview?
How to write the data into EEPROM using Labview?
You would need some sort of EEPROM programmer. Typically might
communicate with it via serial. I don't know how you would do this in
LV. You would need to have the command protocol for the programming
device to start with.
Doug De Clue
gpibssx wrote in message news:<[email protected]>...
> How to write the data into EEPROM using Labview? -
How to load salary data into Oracle HRMS
Hello,
I have a spreadsheet with the following values: employee_number, from (effective_date), annual_salary,bi_weekly_salary, reason_for_change, status. I do not know where (which table in the APPS) to load the data for these employee salaries. If anyone could help me out I would be very grateful. I am trying to load this data into Oracle HRMS.
Thanks!
EricPl post details of OS, database and EBS versions. You will need someone with APPS HRMS experience to guide you thru this process. One option could be to use the WebADI interface. Another option could be the Mass Update feature. The solution will depend on your exact needs
http://docs.oracle.com/cd/E18727_01/doc.121/e13509/T2096T2099.htm#I_sdownup
http://docs.oracle.com/cd/E18727_01/doc.121/e13515/T225534T522356.htm#I_p_maasup
HTH
Srini -
How to store XML data into Oracle Table
I had trouble to store XML data into Oracle Table with XDK (Oracle 8.1.7 ). The error is:
C:\XDK_Java_9_2\xdk\demo\java\Test>java testInsert Dept.xml
<Line 1, Column 1>: XML-0108: (Fatal Error) Start of root element expected.
Exception in thread "main" oracle.xml.sql.OracleXMLSQLException: Start of root element expected.
at oracle.xml.sql.dml.OracleXMLSave.saveXML(OracleXMLSave.java:2263)
at oracle.xml.sql.dml.OracleXMLSave.insertXML(OracleXMLSave.java:1333)
at testInsert.main(testInsert.java:8)
Here is my xml file:
<?xml version = '1.0'?>
<ROWSET>
<ROW num="1">
<DEPTNO>10</DEPTNO>
<DNAME>ACCOUNTING</DNAME>
<LOC>NEW YORK</LOC>
</ROW>
<ROW num="2">
<DEPTNO>20</DEPTNO>
<DNAME>RESEARCH</DNAME>
<LOC>DALLAS</LOC>
</ROW>
<ROW num="3">
<DEPTNO>30</DEPTNO>
<DNAME>SALES</DNAME>
<LOC>CHICAGO</LOC>
</ROW>
<ROW num="4">
<DEPTNO>40</DEPTNO>
<DNAME>OPERATIONS</DNAME>
<LOC>BOSTON</LOC>
</ROW>
</ROWSET>
and here is structure of table:
Name Null? Type
DEPTNO NOT NULL NUMBER(2)
DNAME VARCHAR2(14)
LOC VARCHAR2(13)
and here is my Java Code:
import java.sql.*;
import oracle.xml.sql.dml.OracleXMLSave;
public class testInsert{
public static void main(String[] args) throws SQLException{
Connection conn = getConnection();
OracleXMLSave sav = new OracleXMLSave(conn,"scott.tmp_dept");
sav.insertXML(args[0]);
sav.close();
conn.close();
private static Connection getConnection()throws SQLException{
DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
Connection conn = DriverManager.getConnection("jdbc:oracle:thin:@amt-ebdev01:1521:mydept","scott","tiger");
return conn;
Could you help me ? Thanks !The problem is that you need to pass avalid URL , Document...
Please try this code instead:
import java.net.*;
import java.sql.*;
import java.io.*;
import oracle.xml.sql.dml.OracleXMLSave;
public class testInsert
public static void main(String[] args) throws SQLException{
Connection conn = getConnection();
OracleXMLSave sav = new OracleXMLSave(conn,"scott.temp_dept");
URL url = createURL(args[0]);
sav.insertXML(url);
sav.close();
conn.close();
private static Connection getConnection()throws SQLException{
DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
Connection conn = DriverManager.getConnection("jdbc:oracle:thin:@dlsun1982:1521:jwxdk9i","scott","tiger");
return conn;
// Helper method to create a URL from a file name
static URL createURL(String fileName)
URL url = null;
try
url = new URL(fileName);
catch (MalformedURLException ex)
File f = new File(fileName);
try
String path = f.getAbsolutePath();
// This is a bunch of weird code that is required to
// make a valid URL on the Windows platform, due
// to inconsistencies in what getAbsolutePath returns.
String fs = System.getProperty("file.separator");
if (fs.length() == 1)
char sep = fs.charAt(0);
if (sep != '/')
path = path.replace(sep, '/');
if (path.charAt(0) != '/')
path = '/' + path;
path = "file://" + path;
url = new URL(path);
catch (MalformedURLException e)
System.out.println("Cannot create url for: " + fileName);
System.exit(0);
return url; -
I want to load data into Oracle using XML & Java - hints??
I have a XML files that are created on a timed basis....they describe a photo and point to a dir where the photo is stored...like...
<image>
<user>bill</user>
<img>photo.jpg</img>
<img_dir>'/tmp/photos'</img_dir>
</image>
I'd like to write a Java program that parses the XML and loads the images, data into Oracle.
Suggestions on Oracle tools, downloads that will help me accomplish this???
Thanks!Depending on whether you want assistance in doing the insert into the database or whether you don't mind writing the JDBC code to perform the insert, you can get by with only our XML Parser for Java v2, which implements SAX, DOM, XPath, and XSLT standards. The latest beta release (2.1.0) supports SAX2 and DOM2.
If you want help inserting the XML into tables, then in addition to this, you might want our XML SQL Utility as well.
http://technet.oracle.com/tech/xml
Steve Muench
Lead Product Manager for BC4J and Lead XML Evangelist
Author, Building Oracle XML Applications
null -
Error when using SQL Developer to IMPORT Access data into Oracle
Hello,
I am using SQL Develoepr to export Access mdb file into Oracle. When I try to use Tools ---? Migration---> Microsssfot access exported -->
I am getting an error message upon attaching the Access database file, the error states
"Error#40179 - XMLExporter - Methiod'AddFromFile' of object'_References failed. Export did not complete successfully.
What could be the reason for this error please advise.
ThanksHi,
Try searching for:Re: 30EA2 - No Available Databases in Capture step with MS Access Migration
Thread: 30EA2 - No Available Databases in Capture step with MS Access Migration
Posted: Dec 20, 2010 11:04 AM
Also note that copy to oracle - (for just table/column information) is available on right click.
-Turloch
SQLDeveloper team -
Importing Access Data into Oracle Forms through Forms 10g
Sirs,
How can i import the data of Access file into Oracle tables.
i have the tables in access of approx 10 how can it be imported in oracle with same data structure.
ThanX in advanceDECLARE
kAccess client_ole2.obj_type;
kdb client_ole2.obj_type;
ktables client_ole2.obj_type;
krec client_ole2.obj_type;
kcurr client_ole2.obj_type;
begin
kaccess:=client_ole2.create_obj('Access.application);
kdb:=client_ole2.invoke_obj(kaccess,'open','D:\acc.mdb');
ktables:=client_ole2.get_obj_property(kdb,'tables',1);
//then process teh data of the table which is at 1 using another
krec:=client_ole2.invoke_obj(ktables,'count');
for s in 1 .. krec
loop
/// code for sinserting the current records data into the oracle tables.
kcurr:=client_ole2.get_obj_type(ktables,'recordset',s);
// then access each filed in kcurr and then insert in oracle table
end loop;
end;
the above code is not tested your can alter any syntatical error if any. -
Creating stored procedure to import csv data into tables
I am trying to create a stored procedure to import data from a csv file into a table. I tried using sqlldr but could not run it at school due to access permissions that they will not change. So I looked at the utl_package and from what I can see it requires a "virtual" directory, which conflicts with the access permissions again at school. So can I create a stored procedure that will just read data from a csv file into a table without the need to write or create a file/directory.
ThankyouSatyaki_De wrote:
Since, you are talking about so much restriction - i don't think you will get that.
One alternative solution can be -> write a java based pl/sql procedure and try load that by parsing it. But, for that you need execute privileges on dbms_java package.
Do you have that? I doubt.
Regards.
Satyaki De.Nope not allowed to use java, and im new to oracle. Why can't a stored procedure in pl/sql just read a file and put the data into a table I create prior? -
Import Informix data into Oracle
Hi. We have an Informix 7.25 SE database and we need to schedule daily imports of some of its tables into an Oracle 10g database on Solaris. The databases are on different machines. Thank you for your help.
You could export to a flat-file (e.g CSV) and then import to Oracle using sqlldr.
You could install Oracle Heterogenous Services and setup an Oracle database link to select directly from Informix. -
How to convert blob data into clob using plsql
hi all,
I have requirement to convert blob column into clob .
version details
BANNER
Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - Production
PL/SQL Release 11.1.0.7.0 - Production
CORE 11.1.0.7.0 Production
TNS for 32-bit Windows: Version 11.1.0.7.0 - Production
NLSRTL Version 11.1.0.7.0 - Production
DECLARE
v_blob temp.blob_column%TYPE;------this is blob data type column contains (CSV file which is inserted from screens)
v_clob CLOB; --i want to copy blob column data into this clob
v_warning NUMBER;
BEGIN
SELECT blob_column
INTO v_blob
FROM temp
WHERE pk = 75000676;
DBMS_LOB.converttoclob (dest_lob => v_clob,
src_blob => v_blob,
amount => DBMS_LOB.lobmaxsize,
dest_offset => 1,
src_offset => 1,
blob_csid => 1, -- what is the use of this parameter
lang_context => 1,
warning => v_warning
DBMS_OUTPUT.put_line (v_warning);
EXCEPTION
WHEN OTHERS
THEN
DBMS_OUTPUT.put_line (SQLCODE);
DBMS_OUTPUT.put_line (SQLERRM);
END;I am not getting what is the use of blob_csid , lang_context parameters after going the trough the documentation .
Any help in this regard would be highly appreciated .......
Thanks
Edited by: prakash on Feb 5, 2012 11:41 PMPost the 4 digit Oracle version.
Did you read the Doc for DBMS_LOB.CONVERTTOCLOB? - http://docs.oracle.com/cd/B28359_01/appdev.111/b28419/d_lob.htm
The function can convert data from one character set to another. If the source data uses a different character set than the target you need to provide the character set id of the source data.
The blob_csid parameter is where you would provide the value for the source character set.
If the source and target use the same character set then just pass zero. Your code is passing a one.
>
General Notes
You must specify the character set of the source data in the blob_csid parameter. You can pass a zero value for blob_csid. When you do so, the database assumes that the BLOB contains character data in the same character set as the destination CLOB.
>
Same for 'lang_context' - your code is using 1; just use 0. It is an IN OUT
>
lang_context
(IN) Language context, such as shift status, for the current conversion.
(OUT) The language context at the time when the current conversion is done.
This information is returned so you can use it for subsequent conversions without losing or misinterpreting any source data. For the very first conversion, or if do not care, use the default value of zero. -
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 -
How can import Receipts data into AR?
Hi all,
I want to import Receipts data from a third party application into Oracle Receivables. Can anyone guide me the
required setup?
Thanks
SamHi Sam,
Pl. review following links.
http://prasanthapps.blogspot.in/2011/04/ap-invoice-interface.html
http://erpschools.com/articles/interfaces-and-conversions#13522696818531&14987::resize_frame
http://www.scribd.com/doc/55407832/AR-Interfaces
http://prasanthapps.blogspot.in/2011/05/ar-receipts-api-single-insert-creation.html
HTH
Sanjay
Maybe you are looking for
-
Counting Number of calls Occurring at the same time (Concurrent)
Hi All, Thanks for the help in advance. I have a T-SQL problem I'm not sure how to solve. I have a table which holds calls. The table gives a start time and a booked duration time which I can use to create a booked end time. I would like to count
-
I'd like to decrease my data limit to 1gb or lower. Can I do this with a Droid Mimi, or is 2 the minimum:? Where do I go to on the site to make this change?
-
Hello, I am trying to extract data out of a while loop as my declarations update with respect to the iteration number. I have attempted to use both local variables and shift registers, but with no luck. I have also done the following example: http://
-
Chunking + dimension operator+ owb 11g very slow
Anbody using chunking for loading SCD type 2 dimesnions in Oracle 11g. Can it be used with dimension operator. Also what is Max Chunk iterator count - can't see in the documentation? Thinking about dicthing domension operator for one of our SCD type
-
Difference Between Fireworks PNG vs Flattened PNG?
Hello, I want to save my image as a PNG, however, Fireworks gives me the option to save as a "Fireworks PNG" or as a "Flattened PNG". What is the difference? Thanks in advance!