Hi All,
I have a table with 10 columns. Some columns(2nd,4th,5th,7th,8th and 10th) are Not Null columns. I'll get a tab-delimited file and want to check col by col and generate seperate error code for each col eg:102 if 2nd col value is NULL and 104 if 4th col value is NULL so on... I am a... (7 Replies)
I'm trying to remove the null characters from a file and copy it to std output.
I'm using emacs and I create the following one line bash file (followed by the error messages):
sed -e 's/^@//' <ConfigItemReplicator.install.log
/usr/bin/bash: -c: line 0: unexpected EOF while looking for... (1 Reply)
Hi All,
I have a file with 10 columns and get the required data for nine columns properly except 8th. In 8th column i have both NULL and NON NULL values...i.e
certain records have values for all the columns including 8th column and certain records have 8th column as NULL.My requisite is,without... (20 Replies)
Hi, everyone
I have a requirement as following:
source file
1, abc, def, caaa
2, , cde, aaa
3, bcd, , adefefg
I need find columns which contains null value, in above example,
I need get two rows
2, , cde, aaa
3, bcd, , adefefg
anybody has idea how to achive this
... (5 Replies)
hi,
I had a small question.I had a file from which i need to extract data.
I have written the below script to check if the file exists and if it exists extract requierd columns from the file.
IFILE=/home/home01/Report_1.csv
OFILE=/home/home01/name.csv.out1
if #Checks if file exists... (1 Reply)
hi Gurus,
I need find the null column in a file.
my file like below
abc, ,cde,def
abc,ded,cdd,def
abc, ,ddd,ccd
aaa,bbb,ccc,ddd
basic, I need to find the lines which second column is null
Thanks in advance (3 Replies)
hi,
Am trying to find a solution for finding a null column value inside a loop using array.
for eg:
two
three
five
From the above array myarray,myarray and myarray having null values. But when am trying to check that space using some condition its not working.
for (( i=0;... (4 Replies)
Hi,
I have a huge list of archives (.gz). Each archive is about 40MB. A file is generated every minute so if I want to analyze the data for 1 hour I get already 60 files for example.
These are text files, ';' separated, each line having about 300 fields (columns).
What I need to do is to... (11 Replies)
We have a flat file with below data :
^@^@^@^@00000305^@^@^@^@^@^@430^@430^@^@^@^@^@^@^@^@^@09079989530As we can see ^@ is Null character in this file
I want to remove only the first few null characters before string 00000305
How can we do that, any idea. I want a new file without first few... (5 Replies)
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)