Sponsored Content
Full Discussion: select always the first row
Top Forums Shell Programming and Scripting select always the first row Post 302462504 by iga3725 on Thursday 14th of October 2010 11:09:32 AM
Old 10-14-2010
OK, thanks!
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

select distinct row from a file

Hi, buddies out there. I have a text file ( only one column ) which I created using vi editor. The file contains duplicate rows and I would like to select distinct rows, how to go on it using unix command: file content = apple apple orange watermelon apple orange Can it be done... (7 Replies)
Discussion started by: merry susana
7 Replies

2. Programming

Select several minimum values from row (MySQL)

Hello there. I've got the query like that SELECT count(tour_id) AS cnt FROM orders JOIN tours ON orders.tour_id=tours.id GROUP BY tour_id The result Is cnt 1 4 2 1 1 Now i have to select all records with minimum values in field "cnt" MySQL function min() returns only one.... (2 Replies)
Discussion started by: Trump
2 Replies

3. Shell Programming and Scripting

mysql how to select a specific row from a table

i have a table records ------------ id | user | time | event 91 admin | 12:00 | hi 92 admin | 11:00 | hi 93 admin | 12:00 | bye 94 admin | 13:00 | bye 95 root | 12:00 | hi 96 root | 12:30 | hi 97 root | 12:56 | hi how could i only select and display only the user and event from... (6 Replies)
Discussion started by: kpddong
6 Replies

4. UNIX for Dummies Questions & Answers

Select 2 columns and transpose row by row

Hi, I have a tab-delimited file as follows: 1 1 2 2 3 3 4 4 a a b b c c d d 5 5 6 6 7 7 8 8 e e f f g g h h 9 9 10 10 11 11 12 12 i i j j k k l l 13 13 14 14 15 15 16 16 m m n n o o p p The output I need is: 1 1 a a 5 5 e e 9 9 i i 13... (5 Replies)
Discussion started by: mvaishnav
5 Replies

5. Shell Programming and Scripting

Select row from file and text

Hi all! I would like to solve a problem but I have no clue of how do it!I will be grateful if someone could help me! Briefly I have a big file like this: >ENSMUSG00000000204 | ENSMUST00000159637 GGCGAGGCTTACGCCATTTTACCTCAGCGAGCATTCATAAAGCTGCGAGCATTCATACAG >ENSMUSG00000000204 |... (3 Replies)
Discussion started by: giuliangiuseppe
3 Replies

6. Shell Programming and Scripting

Add Row from First Row (Split Row)

HI Guys, I have Below Input :- RepigA_hteis522 ReptCfiEtrBsCll_aofe MSL04_MSL2_A25_1A 0 9 MSL04_MSL2_A25_1B 0 9 MSL04_MSL2_A25_1C 0 9 RepigA ReptCfiEtrBsCll hteis522 aofe MSL04_MSL2_A25_1A 0 9 MSL04_MSL2_A25_1B 0 9 MSL04_MSL2_A25_1C 0 9 Split Data in two first row... (2 Replies)
Discussion started by: pareshkp
2 Replies

7. 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

8. Shell Programming and Scripting

Splitting single row into multiple rows based on for every 10 digits of last field of the row

Hi ALL, We have requirement in a file, i have multiple rows. Example below: Input file rows 01,1,102319,0,0,70,26,U,1,331,000000113200000011920000001212 01,1,102319,0,1,80,20,U,1,241,00000059420000006021 I need my output file should be as mentioned below. Last field should split for... (4 Replies)
Discussion started by: kotra
4 Replies

9. 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

10. UNIX for Beginners Questions & Answers

Select and copy .csv files based on row and column number

Dear UNIX experts, I'm a command line novice working on a Macintosh computer (Bash shell) and have neither found advice that is pertinent to my problem on the internet nor in this forum. I have hundreds of .csv files in a directory. Now I would like to copy the subset of files that contains... (8 Replies)
Discussion started by: rcsapo
8 Replies
CUBRID_LOB2_READ(3)							 1						       CUBRID_LOB2_READ(3)

cubrid_lob2_read - Read from BLOB/CLOB data.

SYNOPSIS
string cubrid_lob2_read (resource $lob_identifier, int $len) DESCRIPTION
The cubrid_lob2_read(3) function reads $len bytes from the LOB data and returns the bytes read. PARAMETERS
o $lob_identifier -Lob identifier as a result of cubrid_lob2_new(3) or get from the result set. o $len -Length from buffer you want to read from the lob data. RETURN VALUES
Returns the contents as a string. FALSE when there is no more data. NULL on failure. EXAMPLES
Example #1 cubrid_lob2_read(3) example 1 <?php // test_lob (id INT, contents CLOB) $conn = cubrid_connect("localhost", 33000, "demodb", "public", ""); $req = cubrid_execute($conn, "select * from test_lob"); $row = cubrid_fetch_row($req, CUBRID_LOB); print "position now is " . cubrid_lob2_tell($row[1]) . " "; cubrid_lob2_seek($row[1], 10, CUBRID_CURSOR_FIRST); print " position after moving farword is " . cubrid_lob2_tell($row[1]) . " "; $data = cubrid_lob2_read($row[1], 12); print " position after reading is " . cubrid_lob2_tell($row[1]) . " "; print $data . " "; cubrid_lob2_seek($row[1], 5, CUBRID_CURSOR_CURRENT); print " position after moving again is " . cubrid_lob2_tell($row[1]) . " "; $data = cubrid_lob2_read($row[1], 20); print $data . " "; cubrid_disconnect($conn); ?> Example #2 cubrid_lob2_read(3) example 2 <?php // test_lob (id INT, contents CLOB) $conn = cubrid_connect("localhost", 33000, "demodb", "dba", ""); $req = cubrid_execute($conn, "select * from test_lob"); $row = cubrid_fetch_row($req, CUBRID_LOB); while (true) { if ($data = cubrid_lob2_read($row[1], 1024)) { print $data . " "; } elseif ($data === false) { print "There is no more data "; break; } else { print "There must some errors "; break; } } cubrid_disconnect($conn); ?> SEE ALSO
cubrid_lob2_write(3), cubrid_lob2_seek(3), cubrid_lob2_seek64(3), cubrid_lob2_tell(3), cubrid_lob2_tell64(3), cubrid_lob2_size(3), cubrid_lob2_size64(3). PHP Documentation Group CUBRID_LOB2_READ(3)
All times are GMT -4. The time now is 06:31 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy