Advertisement

05.13.2008 at 09:32AM PDT, ID: 23398500
[x]
Attachment Details

Insert only certain rows from Excel into Oracle

Asked by alines in Microsoft Excel Spreadsheet Software, Visual Basic Programming

Tags: Microsoft, Excel, VBA

Hi ... I currently have a VBA script that allows me to upload the contents of an Excel sheet into oracle (shown in code snippet).  Also part of this, when a user makes a change to a row of data the last column of the row is updated with 'Y' for updated.

So the question is how can I insert just those rows of data into Oracle that have been updated with a 'Y' in the last column instead of loading everything e.g. 3 updated rows out of 1000 in total ?

Thanks in advance

Andrew

Start Free Trial
1:
2:
3:
4:
5:
6:
7:
For i = 0 To xlLastRow - 2     'Offset starts at 0, but data starts on row 2 so repeat loop until xlLastrow - 3
        OracleInsert.AddNew
        Call Write_Records(myDemand, rdata, i)      'WriteRecords passes parameters, Recordset - OracleInsert, range - rdata and integer - i
        On Error GoTo ErrHandler:
        OracleInsert.Update
    Next i
    MsgBox i & " record(s) uploaded to database", , "Upload"
[+][-]05.13.2008 at 10:56AM PDT, ID: 21557532

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Microsoft Excel Spreadsheet Software, Visual Basic Programming
Tags: Microsoft, Excel, VBA
Sign Up Now!
Solution Provided By: nike_golf
Participating Experts: 2
Solution Grade: A
 
 
[+][-]05.13.2008 at 12:13PM PDT, ID: 21558310

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.13.2008 at 12:15PM PDT, ID: 21558337

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.13.2008 at 12:19PM PDT, ID: 21558373

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]05.13.2008 at 12:39PM PDT, ID: 21558567

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.13.2008 at 01:27PM PDT, ID: 21558967

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.13.2008 at 01:34PM PDT, ID: 21559025

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628