06-11-2008
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 syntax.
Unix server name is HU-UX
Thanks in advance.
Thanks and Regards,
Suri_unix
10 More Discussions You Might Find Interesting
1. Programming
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
2. Shell Programming and Scripting
Hi,
I would like to know how to update a table in Oracle database, if a command in one shell script either successfully completes or it fails.(like Y if its success or N if its a failure)
While the command is running,I am able to view the log file created in the Unix machine.After the command... (2 Replies)
Discussion started by: ann_124
2 Replies
3. Shell Programming and Scripting
Hi,
I am trying to insert a record into a table (say dips_tbl) which resides in Oracle DB through a ksh script. I want to insert records into few of the table columns-not all. I'll give an e.g. for the date column "CREATE_DATE".
For that I first execute
SQL1="SELECT SYSDATE FROM DUAL"
... (1 Reply)
Discussion started by: dips_ag
1 Replies
4. UNIX for Dummies Questions & Answers
Hi Experts,
can guide how we can Update a Database Table using a txt file source Using
Unix Shell Scripts.
What are the Cron Jobs codes can written to Update DB table.
txt file contains record like data.
US 09/03/2012 User DocType DocID.
these above feilds in txt files need to be updated in... (4 Replies)
Discussion started by: mahesh.sap
4 Replies
5. Shell Programming and Scripting
Hi All,
I want to insert STAT and ENDTIME values for each job in joblist into TBL_DAILY_STATUS table.
Eg: insert into tbl_daily_status values(STAT,ENDTIME);
Please help me on this.
#!/bin/ksh
joblist="com_abc_job com_abc_dot_job com_abc_seq com_abc_det"
for i in $joblist
do... (8 Replies)
Discussion started by: vichuelaa
8 Replies
6. Shell Programming and Scripting
Hi Friends,
I looking for the script for the count of the records in table.
and then it's containg the zero records then should get abort.
and should notify us through mail.
Can you please help me out in this area i am lacking. (5 Replies)
Discussion started by: victory
5 Replies
7. Shell Programming and Scripting
Hello All Members,
I am new to this forum and to the shell scripting. I want to write a shell script to do the following:
Scenario: I have a pipe delimited .txt file with multiple fields in it. The very first row of the file contains the name of the column which resembles the name of the... (18 Replies)
Discussion started by: chetanojha
18 Replies
8. Shell Programming and Scripting
Hello Folks,
I'm working on a requirement to automate the process of generating report(csv file) using metadata info stored in an Oracle table and E-mail it to respective people.
Meta data table:
Report_ID,Report_SUB_ID,Report_DB,Report_SQL,Report_to_email_Id
1,1,DEV,'select * From... (2 Replies)
Discussion started by: venkat_reddy
2 Replies
9. Shell Programming and Scripting
I have a problem with my shell script. I want to insert data from file to table1(empty) and then, compare table1 with table2 and update some fields.
The first part is correct, but the second part does not work. The only way it works is if after the first part I truncate table1 and run the script... (1 Reply)
Discussion started by: nika_mill
1 Replies
10. UNIX for Beginners Questions & Answers
I have this code with me but the condition is If any of the mandatory columns are null then entire file will be rejected.
LOAD DATA
infile ' ' #specifies the name of a datafile containing data that you want to load
BADFILE ' ' #specifies the name of... (1 Reply)
Discussion started by: raka123
1 Replies
LEARN ABOUT DEBIAN
jodreports
JODREPORTS(1) General Commands Manual JODREPORTS(1)
NAME
jodreports - use libjodreports-java directly from the command line to merge OpenDocument text with data
SYNOPSIS
jodreports <template-document> <data-file> <output-document>
DESCRIPTION
jodreports is a java program that merge OpenDocument text with data by using libjodreports-java. The command line tool is especially useful
to test templates while you are adding instructions to them. You use a .properties or .xml file to contain the <data-file> to be merged
into the template. The <template-document> needs to be an existing OpenDocument text with simple fields. A field that will be replaced with
the value of a variable passed can be specified using the standard FreeMarker expression notation by typing the variable name into the doc-
ument as follows
Hi ${name}!
here name will be replaced with the value passed in at runtime.
However, mixing processing instructions and normal text into the document may become confusing and clutter the layout. So JOOReports pro-
vides an alternative way of inserting fields. You can insert a visual field in OpenOffice.org Writer from the menu Insert / Fields /
Other... (or just press Ctrl+F2), then click on the Functions tab and select Input field. Change the field Reference to JOOScript and in
the following field Content enter the variable name (e.g. "$name"). This field will typically be displayed by Writer as a grayed rectangle
with the variable name, while moving the mouse over it will reveal the field reference.
This is a nice way of keeping processing instructions separate from the document layout and is thus the recommended approach. Whatever you
specify as the field Reference will be treated as a FreeMarker ${...} expression, so it could also be something more complex than a simple
variable name.
To insert more advanced instructions, e.g. for conditionally displaying a portion of text, or repeating a table row for each item in a col-
lection, you can use FreeMarker directives.
A simple directive is assign. You can use it to define a new variable, for example
[#assign totalPrice = unitPrice * quantity]
Note that we always use the alternative (square bracket) syntax for FreeMarker directives.
While it may be possible to insert this directive directly as text into the template, this does not always work (for reasons we'll see
below) and as mentioned mixing instructions into the document is a practice we want to avoid anyway. For this reason, JOOReports lets you
insert FreeMarker directives as scripts. You can insert a script in Writer from the menu Insert / Script..., then change the Script type to
JOOScript and insert any FreeMarker directives in the script Text box. A script will be displayed by Writer as a small green rectangle, and
you can double click on it to open it and modify it.
So you directive will be executed at the point where the script has been inserted. This is ok for something like assign but as we'll see
will not work for something like list.
Alternatively, you can insert a FreeMarker directive in OpenOffice.org Writer from the menu Insert / Fields / Other... (or just press
Ctrl+F2), then click on the Functions tab and select Input field. Change the field Reference to JOOScript and in the following field Con-
tent enter the directive (e.g. "[#assign title='Mr.']"). Sample Open Document Template
Again this provides a nice way to insert processing instructions and keept them separate from the document layout.
The <output-document> is also an OpenDocument text and will be created as the result of the merge.
JOOReports uses FreeMarker as its template engine.
FILES
/usr/share/java/jodreports.jar
AUTHOR
jodreports was written by Mirko Nasato <mirko@artofsolving.com> and Terry Liang <terry@polonious.com.au>.
jodreports was packaged for the Debian project by Sascha Girrulat <sascha@girrulat.de>.
This manual page was written by Sascha Girrulat <sascha@girrulat.de>, for the Debian project (and may be used by others). Most of the used
information are reused from http://jodreports.sourceforge.net.
User Manuals January 30, 2011 JODREPORTS(1)