Insert one table and update another with shellscript
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 again.
I want to make everything in one time(insert data and update)
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)
Hey guys/gals,
So here is what i'm starting with...its a Solaris patch diag output.
bash-3.0# pca -l
Using /var/tmp/patchdiag.xref from Oct/20/08
Host: seiftsx4140 (SunOS 5.10/Generic_127128-11/i386/i86pc)
List: missing
Patch IR CR RSB Age Synopsis
------ -- - -- --- ---... (3 Replies)
Hi Guys,
I'm new to this forum as well as to UNIX shell scripting.
I'm looking for a shellscript to query an Oracle database table and populate the result set of the query in a text file.
Could you someone help me out with a sample code?
Thanks,
Bhagat (7 Replies)
This is the sample sqlldr log:
------------------------------------------------------------------------------------------------------------
SQL*Loader: Release 9.2.0.7.0 - Production on Sun Feb 8 23:37:02 2009
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
Control... (13 Replies)
Hi
I am having three oracle databases running in three different machine. their ip address is different. from one of the DB am able to access both the databases.(means am able to select values and insert values in to tables individually.)
I need to fetch some data from DB1 table(say DB1 ip is... (2 Replies)
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)
Hi,
i have a java based tool which does insert operation in a TABLE, and in parallel the same table is used by my C++ code which does select Query.
the Table will be always busy, but sometimes the table is getting locked when i try to make an insert, am bit confused whether the lock is... (0 Replies)
Hello,
Objective is to insert bulk values in DB table using isql.
Following code tried:
isql -SServer_name -Ddb_name -Uuser_name -Ppassword < file.txt
cat file.txt
for i in `cat data_value_file.txt`
do
insert into tempdb..temp_table11 values ('$i')
go
done
cat... (3 Replies)
Right I have a MYSQL database with table1 with 3 columns, colA, colB and colC. I want to combine the data in the 3 columns into a 4th column names col_comb. Here's the SQL command that works:
UPDATE table1 SET `col_comb` = CONCAT( `colA` , ' - ', `colB` , ', ', `colC` );
So now I want this... (5 Replies)
Dear Team
I am using DB2 v10 z/os database . Need expert guidance to figure out best way to track table activities ( Ex Delete, Insert,Update )
Scenario
We have a table which is critical and many developer/testing team access on daily basis . We had instance where some deleted... (1 Reply)
Discussion started by: Perlbaby
1 Replies
LEARN ABOUT PLAN9
home
HOME(8) System Manager's Manual HOME(8)NAME
home, 40meg, 80meg, personalize, update, Disclabel - administration for local file systems
SYNOPSIS
gnot/home
gnot/personalize
gnot/update
magnum/home
magnum/personalize
magnum/update
pc/40meg
pc/80meg
pc/personalize
pc/update
nextstation/home
nextstation/update
DESCRIPTION
These programs help maintain a file system on a local disk for a private machine.
Home partitions a disk, copies the appropriate kernel to the disk, and makes a new file system on the disk. To do this, it overwrites the
vendor-supplied software on the disk with a copy of Plan 9. 40meg, 80meg, and 100meg configure disks and make file systems for disks of
the appropriate size.
Update copies the current kernel to the disk and updates files on the local file system. It only updates those files put there by the home
program.
Personalize removes the contents of the /usr directory on the local disk and copies a minimal set of files for the user who runs the com-
mand.
The file /rc/bin/nextstation/Disclabel, despite its name, is not an rc(1) script. It contains the second stage bootstrap program for
Nextstations booting from local disk. Before booting a Plan 9 Nextstation from disk, it should be installed in the partition
/dev/hd1label; this is normally done by nexstation/home.
FILES
/lib/proto/portproto
Mkfs prototype files for magnum/home, magnum/update, gnot/home, and gnot/update.
/lib/proto/386proto
Mkfs prototype files for pc/40meg, pc/80meg, and pc/update.
SOURCE
/rc/bin/gnot/*
/rc/bin/magnum/*
/rc/bin/pc/*
/rc/bin/nextstation/*
SEE ALSO kfs(4), mkfs(8), prep(8), wren(3)
``Installing the Plan 9 Distribution''.
HOME(8)