update a table using some conditons


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers update a table using some conditons
# 1  
Old 09-03-2012
update a table using some conditons

Hi All,
I have a sample table as below:

A B C
A1 B1.ts
A2 B2.ts
A3 B3-ts
i need to have A1-B1 combination( where B column is a name with timestamp which keeps on changing with systemdate) and update C1 column based on B1.Also B2 will be created only after (say) 30 minutes B1 is created.This code should run only once,so what can be done other than using sleep command inbetween those steps? Please help me with the code for table updation.Thanks
# 2  
Old 09-03-2012
Roshita, from the description you have given, I have no idea what output you want to see in any of the three columns. Please give us explicit details of what you want to see in your table (using code tags) at some point in time, what it should look like 30 minutes later, and what it should look like after another 30 minutes.

Is this table in a file? If so, is the file supposed to be updated in place every 30 minutes or is a new file supposed to be created every 30 minutes containing an updated version of the previous file? Otherwise, where is this table stored?
 
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Update a database table in a for loop

Im trying to update an informix database table for each occurance of a head_barcode in a file called mw within a for loop please see below - cant get the syntax correct. any help please? for a in `cat /tmp/mw` do sql image - << STOP > /dev/null 2>&1 update doc_table set status =... (4 Replies)
Discussion started by: worky
4 Replies

2. UNIX for Beginners Questions & Answers

Sort by record column, Compare with conditons and export the result

Hello, I am new to Unix and would like to seek a help, please. I have 2 files (file_1 and file_2), I need to perform the following actions. 1 ) Sort the both file by the column 26-36 (which is Invoice number) what is sort command with the column sort? 2) Compare the file_1.sorted and... (3 Replies)
Discussion started by: Usagi
3 Replies

3. Shell Programming and Scripting

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... (1 Reply)
Discussion started by: nika_mill
1 Replies

4. Shell Programming and Scripting

How to update a Oracle table through shell scripting?

My Code is get_week_date() { `sqlplus -s ${DQM_SQL_LOGON}@${DQM_SID} << EOF SET ECHO OFF SET FEEDBACK OFF SET PAGES 0 SET SERVEROUTPUT ON SET VERIFY OFF SET TRIMSPOOL ON (update file_level_qc fq set FQ.DATA_FILE_NAME='Hyvee_Pharmacy_Solutions_201304_v1.txt'... (2 Replies)
Discussion started by: karthick.cho
2 Replies

5. Shell Programming and Scripting

Update the table using values from a csv file

i want to run update query for oracle which is in up.sql taking values from a.csv. I have implemented shell script to do it. extn="perl" ls -1 | while read file do echo "$file,$extn" > a.csv done up.sql contains update file_list set filename=$1 where extn=$2; The code to update is... (2 Replies)
Discussion started by: millan
2 Replies

6. UNIX for Dummies Questions & Answers

How to Update DB table from txt file using CRONJOB in Unix Shell Script

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

7. Emergency UNIX and Linux Support

Global update on a file based on a table

Hi, I 'd like to update the below highlighted values in a sample file based on the following table: 8283879A25918000000000005400000000000065629TTF3 8683884F40273000000000003900000000000047399TTF3 8883884FG0063000000000002600000000000031599TTF3... (7 Replies)
Discussion started by: er_ashu
7 Replies

8. Shell Programming and Scripting

To update a column in a table through shell script

Hi All, I need to write a shell script in UNIX that should accept booking number as an argument and update it with value "NULL" if the transaction date is greater than 2 years. Booking number and transaction_date are the two columns of the table table_booking. Something like this, through... (3 Replies)
Discussion started by: shilpa_acc
3 Replies

9. Shell Programming and Scripting

update a oracle table using shell script

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
Login or Register to Ask a Question