Sponsored Content
Full Discussion: How to Update the database
Top Forums UNIX for Advanced & Expert Users How to Update the database Post 99938 by madaans on Wednesday 22nd of February 2006 11:13:30 AM
Old 02-22-2006
How to Update the database

I have to read one input file which will give me some tables info like TradeNo,MsgId,status etc...
I have read that TradeNo from that input file and then look for that trade no in the database table and in the database I have to update the columns for that particular trade which I am getting fron that input file.....
I dnt know how to write exactly.as i am new to shell Script.
and the other thing I can do is I can pass all these paramaters commandline also...
I really dnt know how to write the scripts and I have to write it in k shell...
help me out....
 

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Shell Script: want to insert values in database when update script runs

Hi , I am new to linux and also also to shell scripting. I have one shell script which unpacks .tgz file and install software on machine. When this script runs I want to insert id,filename,description(which will be in readme file),log(which will be in log file) and name of unpacked folder... (1 Reply)
Discussion started by: ring
1 Replies

2. Shell Programming and Scripting

Dynamic update loop query on Sybase database

Hello Guys, I'm new to Shell scripting, and i need someone to help me with this issue: I'm trying to do a dynamic update query on Sysbase database table using shell script. Lets say, the Update query is "update Table set id=X" , where X is dynamic value for the loop index. If the loop is... (10 Replies)
Discussion started by: Alaeddin
10 Replies

3. UNIX and Linux Applications

Edit/update an /etc/group database entry (c/c++)

Hello I'm writing a program for managing accounts and groups in a linux system. My problem is how to update the members of a group in the /etc/group file,if i have to add/remove those members. total 3 variables for adding some new members to the group : char **oldmembers=grp->gr_mem; ... (1 Reply)
Discussion started by: mekos
1 Replies

4. Shell Programming and Scripting

rebuild/update fuppes database if files are added/removed from directory

The title says it all. I have a upnp server running fuppes that is connected to my xbox360. In order to see the files on the xbox360 i have to manually update and rebuild the database anytime i add or remove files. I have tried cron jobs to do it every 20 min which works, but if I am streaming... (0 Replies)
Discussion started by: tr6699
0 Replies

5. Shell Programming and Scripting

download an html file via wget and pass it to mysql and update a database

CAN I download an html file via wget and pass it to mysql and update a database field? (8 Replies)
Discussion started by: mapasainfo
8 Replies

6. Red Hat

How to update rpm database regarding removed file of a package?

For Suppose, I have installed a package having files file1, file2 and file3. After installation, I removed the file "file3". But "rpm -qf file3" is giving the package name, even file3 was not there. And also "rpm -ql package" is also displaying all 3 files. How can i update rpm database about... (6 Replies)
Discussion started by: snreddy_gopu
6 Replies

7. UNIX for Dummies Questions & Answers

Using symbolic link for database MySQL in CentOS, not update sizing

I have no idea what I should set the topic here ==' This is my story, please you there kindly help me I'm quite newbie for this. ================================== My host server is CentOS, I spared 9.9GB for /var path that used by MySQL and...It's full because of heavy load traffic, then... (1 Reply)
Discussion started by: Kapom
1 Replies

8. 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
ANALYZE(7)							   SQL Commands 							ANALYZE(7)

NAME
ANALYZE - collect statistics about a database SYNOPSIS
ANALYZE [ VERBOSE ] [ table [ (column [, ...] ) ] ] INPUTS VERBOSE Enables display of progress messages. table The name (possibly schema-qualified) of a specific table to analyze. Defaults to all tables in the current database. column The name of a specific column to analyze. Defaults to all columns. OUTPUTS ANALYZE The command is complete. DESCRIPTION
ANALYZE collects statistics about the contents of PostgreSQL tables, and stores the results in the system table pg_statistic. Subsequently, the query planner uses the statistics to help determine the most efficient execution plans for queries. With no parameter, ANALYZE examines every table in the current database. With a parameter, ANALYZE examines only that table. It is further possible to give a list of column names, in which case only the statistics for those columns are updated. NOTES It is a good idea to run ANALYZE periodically, or just after making major changes in the contents of a table. Accurate statistics will help the planner to choose the most appropriate query plan, and thereby improve the speed of query processing. A common strategy is to run VAC- UUM [vacuum(7)] and ANALYZE once a day during a low-usage time of day. Unlike VACUUM FULL, ANALYZE requires only a read lock on the target table, so it can run in parallel with other activity on the table. For large tables, ANALYZE takes a random sample of the table contents, rather than examining every row. This allows even very large tables to be analyzed in a small amount of time. Note however that the statistics are only approximate, and will change slightly each time ANALYZE is run, even if the actual table contents did not change. This may result in small changes in the planner's estimated costs shown by EXPLAIN. The collected statistics usually include a list of some of the most common values in each column and a histogram showing the approximate data distribution in each column. One or both of these may be omitted if ANALYZE deems them uninteresting (for example, in a unique-key column, there are no common values) or if the column data type does not support the appropriate operators. There is more information about the statistics in the User's Guide. The extent of analysis can be controlled by adjusting the default_statistics_target parameter variable, or on a column-by-column basis by setting the per-column statistics target with ALTER TABLE ALTER COLUMN SET STATISTICS (see ALTER TABLE [alter_table(7)]). The target value sets the maximum number of entries in the most-common-value list and the maximum number of bins in the histogram. The default target value is 10, but this can be adjusted up or down to trade off accuracy of planner estimates against the time taken for ANALYZE and the amount of space occupied in pg_statistic. In particular, setting the statistics target to zero disables collection of statistics for that column. It may be useful to do that for columns that are never used as part of the WHERE, GROUP BY, or ORDER BY clauses of queries, since the planner will have no use for statistics on such columns. The largest statistics target among the columns being analyzed determines the number of table rows sampled to prepare the statistics. Increasing the target causes a proportional increase in the time and space needed to do ANALYZE. COMPATIBILITY
SQL92 There is no ANALYZE statement in SQL92. SQL - Language Statements 2002-11-22 ANALYZE(7)
All times are GMT -4. The time now is 09:44 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy