where I need based on the first column go through all the instances with the same pattern and print out only the rows where the last column has MAX value.
Hi,
I want to print column value based on row number say multiple of 8.
Input file:
line 1 67 34
line 2 45 57
. . .
. . .
line 8 12 46
. . .
. . .
line 16 24 90
. . .
. . .
line 24 49 67
Output
46
90
67 (2 Replies)
Is it possible to print max number of 2 columns - awk
note: print max if the integer is positive and print min if the integer is negative
input
a 1 2
b 3 4
c 5 1
d -3 -5
d -5 -3
output
a 2
b 4
c 5
d -5
d -5 (4 Replies)
Hi.
How can we print those rows of file2 which are mentioned in file1. first character of file1 is a row number.. for eg
file1
1:abc
3:ghi
6:pqr
file2
a abc
b def
c ghi
d jkl
e mno
f pqr
... (6 Replies)
Hello Team,
Need your expertise on following:
Here is the set of data:
C1|4|C1SP1|A1|C1BP1|T1
C1|4|C1SP2|A1|C1BP2|T2
C2|3|C2SP1|A2|C2BP1|T2
C3|3|C3SP1|A3|C3BP1|T2
C2|2|C2SP2|A2|C2BP2|T1
I need to filter above date base on following two steps:
1. Group them by column 1 and 4
2.... (12 Replies)
Discussion started by: angshuman
12 Replies
LEARN ABOUT PHP
db2_statistics
DB2_STATISTICS(3) 1 DB2_STATISTICS(3)db2_statistics - Returns a result set listing the index and statistics for a tableSYNOPSIS
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)