Sponsored Content
Top Forums Shell Programming and Scripting Script to load XML file to Oracle table Post 303023064 by cero on Tuesday 11th of September 2018 08:47:05 AM
Old 09-11-2018
Hi,
the SQL*Loader-tool is designed to do that, no script needed. You do not say what database version you use, so I'll point you to the 10g documentation for loading XML-files into tables:
29 Loading XML Data Using SQL*Loader
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How to load comma seperated values file (*.csv) into Oracle table

Hi all I need to input values in a .csv file into my Oracle table running in Unix, I wonder what would be the command to do so... The values are recorded in an excel file and I tried using a formatted text file to do so but failed because one of the field is simply too large to fit in the... (5 Replies)
Discussion started by: handynas
5 Replies

2. UNIX for Advanced & Expert Users

How to load comma seperated values file (*.csv) into Oracle table

Hi all I need to input values in a .csv file into my Oracle table running in Unix, I wonder what would be the command to do so... The values are recorded in an excel file and I tried using a formatted text file to do so but failed because one of the field is simply too large to fit in the... (4 Replies)
Discussion started by: handynas
4 Replies

3. Programming

How can i load or insert a table in oracle from c language thru unix environment

I'm having a oracle server and i'm having a table in that. I'm having a linux server which is in network with the oracle server. I need to write a c program in linux env when on execution loads the table with the text file given as input. Please explain me the flow of process in that and also... (6 Replies)
Discussion started by: rramprasad
6 Replies

4. UNIX for Advanced & Expert Users

unix script for update or insert records from a file to a oracle table

Hi, I have delimited file(|). Sample data: 1|name|50009|DS24|0|12 2|name|30009|DS24|0|13 3|name|20409|DS24|0|14 4|name|20009|DS24|0|15 5|name|10009|DS24|0|16 I want to load this data into a oracle table (update and insert) Please help me the commands and also... (1 Reply)
Discussion started by: unihp1
1 Replies

5. Shell Programming and Scripting

shell script to read data from text file and to load it into a table in TOAD

Hi....can you guys help me out in this script?? Below is a portion text file and it contains these: GEF001 000093625 MKL002510 000001 000000 000000 000000 000000 000000 000001 GEF001 000093625 MKL003604 000001 000000 000000 000000 000000 000000 000001 GEF001 000093625 MKL005675 000001... (1 Reply)
Discussion started by: pallavishetty
1 Replies

6. Shell Programming and Scripting

To load data from variable to oracle table

Hi all, How to load variable value into Oracle table? I have created a file validation shell script. After the validation completes, i need to update a Oracle table with the variable value... Can someone help me how to do it? I have searched, but not able to get answer. i have 4... (1 Reply)
Discussion started by: Amit.Sagpariya
1 Replies

7. Shell Programming and Scripting

To load data from variable to oracle table ....???

Hi all, How to load variable value into Oracle table? I have created a file validation shell script. After the validation completes, i need to update a Oracle table with the variable value... Can someone help me how to do it? I have searched, but not able to get answer. i have 4 variables... (2 Replies)
Discussion started by: Amit.Sagpariya
2 Replies

8. Shell Programming and Scripting

load a data from text file into a oracle table

Hi all, I have a data like, 0,R001,2,D this wants to be loaded into a oracle database table. Pl let me know how this has to be done. Thanks in advance (2 Replies)
Discussion started by: raji35
2 Replies

9. Shell Programming and Scripting

Script to load daily average I/O stats from a .ksh file into Oracle db

Hi can anyone help me with a script to load output of the .ksh file into an Oracle database. I have attached sample output of the information that i need to load to the database (2 Replies)
Discussion started by: LucyYani
2 Replies

10. Shell Programming and Scripting

Script to create the SQLLDR control file from Oracle table.

I need to create the shell script load the few 100 table using the SQLLDR. Need to generate the control file for each table using oracle table. table has "table names" and "column names" using this need create the control file. example table rows below table_nme column_nme DEPT ... (2 Replies)
Discussion started by: pimmit22043
2 Replies
Data::Phrasebook(3pm)					User Contributed Perl Documentation				     Data::Phrasebook(3pm)

NAME
Data::Phrasebook - Abstract your queries! ABSTRACT
A collection of modules for accessing phrasebooks from various data sources. SYNOPSIS
use Data::Phrasebook; my $q = Data::Phrasebook->new( class => 'Plain', loader => 'Text', file => 'phrases.txt', ); # simple keyword to phrase mapping my $phrase = $q->fetch($keyword); # keyword to phrase mapping with parameters $q->delimiters( qr{ [% s* (w+) s* %] }x ); my $phrase = $q->fetch($keyword,{this => 'that'}); DESCRIPTION
Data::Phrasebook is a collection of modules for accessing phrasebooks from various data sources. PHRASEBOOKS
To explain what phrasebooks are it is worth reading Rani Pinchuk's (author of Class::Phrasebook) article on Perl.com: <http://www.perl.com/pub/a/2002/10/22/phrasebook.html> Common uses of phrasebooks are in handling error codes, accessing databases via SQL queries and written language phrases. Examples are the mime.types file and the hosts file, both of which use a simple phrasebook design. Unfortunately Class::Phrasebook is a complete work and not a true class based framework. If you can't install XML libraries, you cannot use it. This distribution is a collaboration between Iain Truskett and myself to create an extendable and class based framework for implementing phrasebooks. CLASSES
In creating a phrasebook object, a class type is required. This class defines the nature of the phrasebook or the behaviours associated with it. Currently there are two classes, Plain and SQL. The Plain class is the default class, and allows retrieval of phrases via the fetch() method. The fetch() simply returns the phrase that maps to the given keyword. The SQL class allows specific database handling. Phrases are retrieved via the query() method. The query() method internally retrieves the SQL phrase, then returns the statement handler object, which the user can then perform a prepare/execute/fetch/finish sequence on. For more details see Data::Phrasebook::SQL. CONSTRUCTOR
new The arguments to new depend upon the exact class you're creating. The default class is "Plain" and only requires the Loader arguments. The "SQL" class requires a database handle as well as the Loader arguments. The "class" argument defines the object class of the phrasebook and the behaviours that can be associated with it. Using "Foobar" as a fake class, the class module is searched for in the following order: 1. If you've subclassed "Data::Phrasebook", for example as "Dictionary", then "Dictionary::Foobar" is tried. 2. If that failed, "Data::Phrasebook::Foobar" is tried. 3. If that failed, "Foobar" is tried. 4. If all the above failed, we croak. This should allow you some flexibility in what sort of classes you use while not having you type too much. For other parameters, see the specific class you wish to instantiate. The class argument is removed from the arguments list and the "new" method of the specified class is called with the remaining arguments. DELIMITERS
Delimiters allow for variable substitution in the phrase. The default style is ':variable', which would be passed as: $q->delimiters( qr{ :(w+) }x ); As an alternative, a Template Toolkit style would be passed as: $q->delimiters( qr{ [% s* (w+) s* %] }x ); DICTIONARIES
Simple Dictionaries Data::Phrasebook supports the use of dictionaries. See the specific Loader module to see how to implement the dictionary within your phrasebook. Using Data::Phrasebook::Loader::Ini as an example, the dictionary might be laid out as: [Stuff] language=Perl platform=Linux [Nonsense] platform=Windows The phrasebook object is then created and used as: my $q = Data::Phrasebook->new( class => 'Plain', loader => 'Ini', file => 'phrases.ini', dict => 'Nonsense', ); my $language = $q->fetch('language'); # retrieves 'Perl' my $platform = $q->fetch('platform'); # retrieves 'Windows' The former is from the default (first) dictionary, and the second is from the named dictionary ('Nonsense'). If a phrase is not found in the named dictionary an attempt is made to find it in the default dictionary. Otherwise undef will be returned. Once a dictionary or file is specified, changing either requires reloading. As this is done at the loader stage, we need to let it know what it needs to reload. This can be done with the either (or both) of the following: $q->file('phrases2.ini'); $q->dict('Stuff'); A subsequent fetch() will then reload the file and dictionary, before retrieving the phrase required. However, a reload only takes place if both the file and the dictionary passed are not the ones currently loaded. Multiple Dictionaries As of version 0.25, the ability to provide prescendence over multiple dictionaries for the same phrasebook. Using Data::Phrasebook::Loader::Ini again as an example, the phrasebook might be laid out as: [AndTheOther] language=Perl platform=Linux network=LAN [That] platform=Solaris network=WLAN [This] platform=Windows The phrasebook object is then created and used as: my $q = Data::Phrasebook->new( class => 'Plain', loader => 'Ini', file => 'phrases.ini', dict => ['This','That','AndTheOther'], ); my $language = $q->fetch('language'); # retrieves 'Perl' my $platform = $q->fetch('platform'); # retrieves 'Windows' my $network = $q->fetch('nework'); # retrieves 'WLAN' The first dictionary, if not specified and supported by the Loader module, is still used as the default dictionary. The dictionaries can be specified, or reordered, using the object method: $q->dict('That','AndTheOther','This'); A subsequent reload will occur with the next fetch call. DEDICATION
Much of the original class framework work is from Iain's original code. My code was a lot simpler and was tied to using just an INI data source. Merging all the ideas and code together we came up with this distribution. Unfortunately Iain died in December 2003, so he never got to see or play with the final working version. I can only thank him for his thoughts and ideas in getting this distribution into a state worthy of release. Iain Campbell Truskett (16.07.1979 - 29.12.2003) SEE ALSO
Data::Phrasebook::Plain, Data::Phrasebook::SQL, Data::Phrasebook::SQL::Query, Data::Phrasebook::Debug, Data::Phrasebook::Generic, Data::Phrasebook::Loader, Data::Phrasebook::Loader::Text, Data::Phrasebook::Loader::Base. SUPPORT
Please see the README file. DSLIP
b - Beta testing d - Developer p - Perl-only O - Object oriented p - Standard-Perl: user may choose between GPL and Artistic AUTHOR
Original author: Iain Campbell Truskett (16.07.1979 - 29.12.2003) Maintainer: Barbie <barbie@cpan.org> since January 2004. for Miss Barbell Productions <http://www.missbarbell.co.uk>. COPYRIGHT AND LICENSE
Copyright (C) 2003 Iain Truskett. Copyright (C) 2004-2010 Barbie for Miss Barbell Productions. This module is free software; you can redistribute it and/or modify it under the Artistic Licence v2. perl v5.10.1 2010-10-15 Data::Phrasebook(3pm)
All times are GMT -4. The time now is 04:34 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy