Search row by row from one file to another file if match is found print few colums of file 2


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Search row by row from one file to another file if match is found print few colums of file 2
# 8  
Old 04-15-2014
Thanks

Thanks a lot srini. It worked. i was struggling to add the table column at the last.

Thanks franklin Smilie
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Print every alternate column in row in a text file

Hi, I have a comma separated file. I would like to print every alternate columns into a new row. Example input file: Name : John, Age : 30, DOB : 30-Oct-2018 Example output: Name,Age,DOB John,30,30-Oct-2018 (3 Replies)
Discussion started by: Lini
3 Replies

2. Shell Programming and Scripting

Perl script to fill the entire row of Excel file with color based on pattern match

Hi All , I have to write one Perl script in which I need to read one pre-existing xls and based on pattern match for one word in some cells of the XLS , I need to fill the entire row with one color of that matched cell and write the content to another excel Please find the below stated... (2 Replies)
Discussion started by: kshitij
2 Replies

3. UNIX for Beginners Questions & Answers

Keep only the closet match of timestamped row (include headers) from file1 to precede file2 row/s

This is a question that is related to one I had last August when I was trying to sort/merge two files by millsecond time column (in this case column 6). The script (below) that helped me last august by RudiC solved the puzzle of sorting/merging two files by time, except it gets lost when the... (0 Replies)
Discussion started by: aachave1
0 Replies

4. UNIX for Beginners Questions & Answers

Keep only the closet match of timestamped row (include headers) from file1 to precede file2 row/s

My original files are like this below and I distinguish them from the AP_ID (file1 has 572 and file2 has 544). Also, the header on file1 has “G_” pre-pended. NOTE: these are only snippets of very large files and much of the data is not present here. Original File 1: ... (36 Replies)
Discussion started by: aachave1
36 Replies

5. Shell Programming and Scripting

Read row number from 1 file and print that row of second file

Hi. How can I read row number from one file and print that corresponding record present at that row in another file. eg file1 1 3 5 7 9 file2 11111 22222 33333 44444 55555 66666 77777 88888 99999 (3 Replies)
Discussion started by: Abhiraj Singh
3 Replies

6. UNIX for Dummies Questions & Answers

awk to print first row with forth column and last row with fifth column in each file

file with this content awk 'NR==1 {print $4} && NR==2 {print $5}' file The error is shown with syntax error; what can be done (4 Replies)
Discussion started by: cdfd123
4 Replies

7. Shell Programming and Scripting

Subtracting each row from the first row in a single column file using awk

Hi Friends, I have a single column data like below. 1 2 3 4 5 I need the output like below. 0 1 2 3 4 where each row (including first row) subtracting from first row and the result should print below like the way shown in output file. Thanks Sid (11 Replies)
Discussion started by: ks_reddy
11 Replies

8. Shell Programming and Scripting

Get a group of line from different file and put them into one file row by row

hi guys, today i'm stuck in a new problem. the title explain more or less but a particular had been omitted. So i'm going to describe below the situation with an example. I have different html files and each of them have a consecutive lines group inside that i want to extract. example: ... (8 Replies)
Discussion started by: sbobotex
8 Replies

9. Shell Programming and Scripting

Append Second Row to First Row @ end in a file

Hi I want to append line 2n to 2n-1 line where n=1...LastLine in my file. eg: Actual File: Hello Everyone Welcome TO Unix I need Your help Required File: HelloEveryone WelcomeTO Unix I needYour help (5 Replies)
Discussion started by: dashing201
5 Replies

10. Shell Programming and Scripting

Changing the column for a row in a text file and adding another row

Hi, I want to write a shell script which increments a particular column in a row from a text file and then adds another row below the current row with the incremented value . For Eg . if the input file has a row : abc xyz lmn 89 lm nk o p I would like the script to create something like... (9 Replies)
Discussion started by: aYankeeFan
9 Replies
Login or Register to Ask a Question
DB2_STATISTICS(3)							 1							 DB2_STATISTICS(3)

db2_statistics - Returns a result set listing the index and statistics for a table

SYNOPSIS
resource db2_statistics (resource $connection, string $qualifier, string $schema, string $table-name, bool $unique) DESCRIPTION
Returns a result set listing the index and statistics for a table. PARAMETERS
o $connection - A valid connection to an IBM DB2, Cloudscape, or Apache Derby database. o $qualifier - A qualifier for DB2 databases running on OS/390 or z/OS servers. For other databases, pass NULL or an empty string. o $schema - The schema that contains the targeted table. If this parameter is NULL, the statistics and indexes are returned for the schema of the current user. o $table_name - The name of the table. o $unique - An integer value representing the type of index information to return. o $0 - Return only the information for unique indexes on the table. o $1 - Return the information for all indexes on the table. RETURN VALUES
Returns a statement resource with a result set containing rows describing the statistics and indexes for the base tables matching the specified parameters. The rows are composed of the following columns: +--------------+---------------------------------------------------+ | Column name | | | | | | | Description | | | | +--------------+---------------------------------------------------+ | TABLE_CAT | | | | | | | The catalog that contains the table. The value is | | | NULL if this table does not have catalogs. | | | | | TABLE_SCHEM | | | | | | | Name of the schema that contains the table. | | | | | TABLE_NAME | | | | | | | Name of the table. | | | | | NON_UNIQUE | | | | | | | An integer value representing whether the index | | | prohibits unique values, or whether the row rep- | | | resents statistics on the table itself: | | | | | | box, tab (|); c | c | . T{ Return value | | | | | | Parameter type | | | | +--------------+---------------------------------------------------+ |0 (SQL_FALSE) | | | | | | | The index allows duplicate values. | | | | |1 (SQL_TRUE) | | | | | | | The index values must be unique. | | | | | | | | NULL | | | | | | | This row is statistics information for the table | | | itself. | | | | +--------------+---------------------------------------------------+ T} T{ INDEX_QUALIFIER T} |T{ A string value representing the qualifier that would have to be prepended to INDEX_NAME to fully qualify the index. T} T{ INDEX_NAME T} |T{ A string representing the name of the index. T} T{ TYPE T} |T{ An integer value representing the type of information contained in this row of the result set: +------------------------+---------------------------------------------------+ | Return value | | | | | | | Parameter type | | | | +------------------------+---------------------------------------------------+ | 0 (SQL_TABLE_STAT) | | | | | | | The row contains statistics about the table | | | itself. | | | | |1 (SQL_INDEX_CLUSTERED) | | | | | | | The row contains information about a clustered | | | index. | | | | | 2 (SQL_INDEX_HASH) | | | | | | | The row contains information about a hashed | | | index. | | | | | 3 (SQL_INDEX_OTHER) | | | | | | | The row contains information about a type of | | | index that is neither clustered nor hashed. | | | | +------------------------+---------------------------------------------------+ T} T{ ORDINAL_POSITION T} |T{ The 1-indexed position of the column in the index. NULL if the row contains statistics information about the table itself. T} T{ COLUMN_NAME T} |T{ The name of the column in the index. NULL if the row contains statistics information about the table itself. T} T{ ASC_OR_DESC T} |T{ A if the column is sorted in ascending order, D if the column is sorted in descending order, NULL if the row contains statistics informa- tion about the table itself. T} T{ CARDINALITY T} |T{ If the row contains information about an index, this column contains an integer value representing the number of unique values in the index. If the row contains information about the table itself, this column contains an integer value representing the number of rows in the table. T} T{ PAGES T} |T{ If the row contains information about an index, this column contains an integer value representing the number of pages used to store the index. If the row contains information about the table itself, this column contains an integer value representing the number of pages used to store the table. T} T{ FILTER_CONDITION T} |T{ Always returns NULL. T} SEE ALSO
db2_column_privileges(3), db2_columns(3), db2_foreign_keys(3), db2_primary_keys(3), db2_procedure_columns(3), db2_procedures(3), db2_spe- cial_columns(3), db2_table_privileges(3), db2_tables(3). PHP Documentation Group DB2_STATISTICS(3)