Hi All,
I have a comma separated value (.CSV) file like the one below. The file contains about 20000 lines.
FileName
EmpNo,Name,Age,Sex,Band,Spouse,Children,Salary,
1000,Arnold,24,M,B,N.A.,No,10000,
1001,Jenny,27,F,C,John,2,20000,
...................................
What i need is to... (1 Reply)
Hi All,
I have a tab delimited input file with say 4 fields (columns) as below :
0000443 1AGPR061 2006 Daiml
0002198 1B3XG0K2 1989 Chdds
0002199 1Bd64J0L 1990 Ch34s
0002275 1B3s4J0K 1989 Chadys
0002276 1B465302 2002 Dageml
0002290 1B45430K 1989 Cays
I want the 2nd column in file to... (5 Replies)
Hi, Iam new to unix. I have one input file .
Input file :
ID1~Name1~Place1
ID2~Name2~Place2
ID3~Name3~Place3
I need output such that only first column should change to fixed width column of 15 characters of length.
Output File:
ID1<<12 spaces>>Name1~Place1
ID2<<12... (5 Replies)
Match column 3 in file1 to column 1 in file 2 and replace with column 2 from file2
file 1 sample
SNDK 80004C101 AT
XLNX 983919101 BB
NETL 64118B100 BS
AMD 007903107 CC
KLAC 482480100 DC
TER 880770102 KATS
ATHR 04743P108 KATS... (7 Replies)
Hi Everyone,
I was wondering if someone could help me to transform my data into a format I need.
Here is an example of what my data looks like
E F G H
A 1 2 3 4
B 5 6 7 8
C 9 1 2 3
D 4 5 6 7
and this is what I would need it to look like:
AE 1
BE 5
CE 9
DE 4
AF 2
BF 6
CF 1 (6 Replies)
Hi,
I have a tab delimited text file with three different columns. I want to add an extra column to the text file. The extra column will be the second column and it will equal third column - 1. How do I go about doing that? Thanks!
Input:
chr1 788822 rs11240777
chr1 1008567 rs9442372... (2 Replies)
Hi,
I have an input file in which I need to add a column with the value of part of another column.
I.e. I have the following line (example, not the actual data):
field1,field2,field3,test12,field5,field6I need to get the last two characters of the 4th field, and add them at the end as a... (5 Replies)
Hello,
I was wondering how I could change this input:
cat f1
to produce this output:
As you can tell, I have several unsorted repeating strings in col1 of the input file. Each of these strings has an associated word in col2. Col2 has a total of 4 possible words (go, stop,... (3 Replies)
Hallo Team,
I have a .csv file. I would like to have another column called Prefix. Under column Prefix i would like to have the first 3 numbers from the theird column.
Other Licenced Operator Alpha Code Numbering Per minute Interconnect Fee per rate group (R Excluding VAT) ... (4 Replies)
Hi,
I's like to ask for help with the following question:
this is an example file:
1 2 3 4 5 6 7 8 9 10
1 2 3 4 5 6 7 8 9 10
1 2 3 4 5 6 7 8 9 10
1 2 3 4 5 6 7 8 9 10
I need to have it re-arranged in the following manner: first 2 columns, zero, zero, last two columns, columns 3 to... (6 Replies)
Discussion started by: zajtat
6 Replies
LEARN ABOUT PHP
cubrid_column_types
CUBRID_COLUMN_TYPES(3) 1 CUBRID_COLUMN_TYPES(3)cubrid_column_types - Get column types in resultSYNOPSIS
array cubrid_column_types (resource $req_identifier)
DESCRIPTION
The cubrid_column_types(3) function gets column types of query results by using $req_identifier.
PARAMETERS
o $req_identifier
-Request identifier.
RETURN VALUES
Array of string values containing the column names, when process is successful.
FALSE, when process is unsuccessful.
EXAMPLES
Example #1
cubrid_column_types(3) example
<?php
$conn = cubrid_connect("localhost", 33000, "demodb", "dba");
$result = cubrid_execute($conn, "SELECT * FROM game WHERE host_year=2004 AND nation_code='AUS' AND medal='G'");
$column_names = cubrid_column_names($result);
$column_types = cubrid_column_types($result);
printf("%-30s %-30s %-15s
", "Column Names", "Column Types", "Column Maxlen");
for($i = 0, $size = count($column_names); $i < $size; $i++) {
$column_len = cubrid_field_len($result, $i);
printf("%-30s %-30s %-15s
", $column_names[$i], $column_types[$i], $column_len);
}
cubrid_disconnect($conn);
?>
The above example will output:
Column Names Column Types Column Maxlen
host_year integer 11
event_code integer 11
athlete_code integer 11
stadium_code integer 11
nation_code char 3
medal char 1
game_date date 10
SEE ALSO cubrid_column_names(3), cubrid_prepare(3), cubrid_execute(3).
PHP Documentation Group CUBRID_COLUMN_TYPES(3)