Home » Developer & Programmer » Forms » Select a file and load csv data into a table (oracle 10g,designer,forms)
Select a file and load csv data into a table [message #447589] Tue, 16 March 2010 05:00 Go to next message
Messages: 979
Registered: October 2009
Location: India
Senior Member
Hi, I am new to oracle designer, forms. The requirement is to select a csv file in a form ,read the file and load selected columns from a csv file into a table.

I am using CLIENT_TEXT_IO. I want to know how to extract the data from selected columns from csv file and insert into a table if the lenth of the columns are of variable length.

Another condition is that if there are duplicate rows based on orderid then take the maximum order seq nbr.Do I need to use
temp table for this logic? Or there is any better approach?

[Updated on: Tue, 16 March 2010 05:03]

Report message to a moderator

Re: Select a file and load csv data into a table [message #448734 is a reply to message #447589] Thu, 25 March 2010 01:25 Go to previous message
Messages: 10180
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
As long as the length of the input data is less than or equal to the column width then just use an assignment.

Test whether you already have the 'orderid' in the database. If it exists then test whether the new 'order seq nbr' is greater than the one that exists in the stored record. If the new one is greated than delete the existing entry and insert the new one, if not then read the next 'csv' record.

Previous Topic: Rows to Column
Next Topic: Finger prints in Forms 6i (plus rant from user) and OCX object problem (merged by DJM)
Goto Forum:

Current Time: Fri Jul 21 02:01:25 CDT 2017

Total time taken to generate the page: 0.10595 seconds