Split column data if the table has n number of column's with some record then how to split n number of colmn's line by line with records
Table
---------
Col1 col2 col3 col4 ....................col20
1 2 3 4 .................... 20
a b c d .................... v
... (11 Replies)
please write a shell script
Table
--------------------------
1 2 3 a b c
3 4 5 c d e
7 8 9 f g h
Output should be like this
---------------
1 2 3
3 4 5
7 8 9
a b c
c d e
f g h (1 Reply)
I am trying to generate code
1. move entire list of file names with specific pattern(standard patterned name for example file name is <process>_<country>_<yymmdd>) in a directory to a variable
2. Use variable in netezza code to check file name exist in a table or not?
for example: Employee... (1 Reply)
Hi all!
trying my best to parse a public site for information (ie fiscal year and turnover) about corporations.
Doing this by having a file with business name and registration number (search key)
the file bolag.txt currently looks like this
Burgundy 556732-7217
AcademicSearch 556406-9879... (11 Replies)
Hi,
I have an ascii file containing information. This file is n x m lines.
Is there a way to generate an ascii file where the information is stored as n x m table instead? The m columns should be tab separated.
Thanks a lot,
Sarah (11 Replies)
Hi All,
in bash I have a text file which is something like
7.96634E-07 1.0000 0.00000E+00 0.0000 0.00000E+00 0.0000 1.59327E-06 0.7071
2.23058E-05 0.1890 6.61207E-05 0.1098 1.13919E-04 0.0865 1.47377E-04 0.0747
....
....
0.00000E+00 0.0000 0.00000E+00 0.0000 ... (6 Replies)
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)
Hi all,
Im new to scripting and have no idea how to start this. Recently I had to Query an Oracle database to find a count(distinct version) from every single table inside. I want to write this up into a script for the future.
I have a template to connect to the database, so that is not the... (1 Reply)
CUBRID_FETCH_FIELD(3) 1 CUBRID_FETCH_FIELD(3)cubrid_fetch_field - Get column information from a result and return as an objectSYNOPSIS
object cubrid_fetch_field (resource $result, [int $field_offset])
DESCRIPTION
This function returns an object with certain properties of the specific column. The properties of the object are:
o $name
-column name
o $table
-name of the table that the column belongs to
o $def
-default value of the column
o $max_length
-maximum length of the column
o $not_null
-1 if the column cannot be NULL
o $primary_key
-1 if the column is a primary key
o $unique_key
-1 if the column is an unique key
o $multiple_key
-1 if the column is a non-unique key
o $numeric
-1 if the column is numeric
o $blob
-1 if the column is a BLOB
o $type
-the type of the column
o $unsigned
-1 if the column is unsigned
o $zerofill
-1 if the column is zero-filled
PARAMETERS
o $result
-$result comes from a call to cubrid_execute(3)
o $field_offset
- The numerical field offset. If the field offset is not specified, the next field (that was not yet retrieved by this function)
is retrieved. The $field_offset starts at 0.
RETURN VALUES
Object with certain properties of the specific column, when process is successful.
FALSE on failure.
EXAMPLES
Example #1
cubrid_fetch_field(3) example
<?php
$conn = cubrid_connect("localhost", 33000, "demodb");
$req = cubrid_execute($conn, "SELECT event_code,athlete_code,nation_code,game_date FROM game WHERE host_year=1988 and event_code=20001;");
var_dump(cubrid_fetch_row($req));
cubrid_field_seek($req, 1);
$field = cubrid_fetch_field($req);
printf("
--- Field Properties ---
");
printf("%-30s %s
", "name:", $field->name);
printf("%-30s %s
", "table:", $field->table);
printf("%-30s "%s"
", "default value:", $field->def);
printf("%-30s %d
", "max length:", $field->max_length);
printf("%-30s %d
", "not null:", $field->not_null);
printf("%-30s %d
", "primary key:", $field->primary_key);
printf("%-30s %d
", "unique key:", $field->unique_key);
printf("%-30s %d
", "multiple key:", $field->multiple_key);
printf("%-30s %d
", "numeric:", $field->numeric);
printf("%-30s %d
", "blob:", $field->blob);
printf("%-30s %s
", "type:", $field->type);
printf("%-30s %d
", "unsigned:", $field->unsigned);
printf("%-30s %d
", "zerofill:", $field->zerofill);
cubrid_close_request($req);
cubrid_disconnect($conn);
?>
The above example will output:
array(4) {
[0]=>
string(5) "20001"
[1]=>
string(5) "16681"
[2]=>
string(3) "KOR"
[3]=>
string(9) "1988-9-30"
}
--- Field Properties ---
name: athlete_code
table: game
default value: ""
max length: 0
not null: 1
primary key: 1
unique key: 1
multiple key: 0
numeric: 1
blob: 0
type: integer
unsigned: 0
zerofill: 0
PHP Documentation Group CUBRID_FETCH_FIELD(3)