Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Database > Oracle
Oracle General Oracle database discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Oracle section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old July 1st, 2004, 05:00 PM
Registered User
Join Date: Jul 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default variable number of fields in record

I have a data file in which the num fields can be different.
"name" numhost "host"
the numhost value decides how many "host" entries are going to be in the record.
"john" 1 "sunhost"
"mary" 2 "sunhost" "sunhost2"

I need to load thhis file in a table in oracle9i.

There are around a million records in the file so i dont want to use the regular perl file processing linewise.

Any insights as to how to achieve this efficiently would be great.

I started thing in terms loading the table using sqlloader and using varrays to collect the hosts .
which is fine , but the final table needs to have the host names separated by the commas, in a single record. and i am not able to think of away of selecting varray data from temp table and concatinating it as a comma separated string and inserting it into the main table.

again the volume of data needs to be taken care of too.

any help would be apreciated.

Similar Threads
Thread Thread Starter Forum Replies Last Post
Update query: Editing phone number fields? monacle Access 2 February 27th, 2007 08:55 AM
Current Record Number Base VB How-To 1 December 7th, 2005 05:26 PM
specifying number of text fields Astro VB How-To 64 August 9th, 2005 08:02 PM
record number maximum Jorge SQL Server 2000 3 December 3rd, 2004 12:00 PM
show the record number yami56 Access 9 April 5th, 2004 08:35 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.