hi all,
could anyone help me?
I need to query output by compare dates from 2 table and i'm using a UNION query..and wanted to sort the output by date..
My query like this:
SELECT
TO_CHAR(DATE) DATE1,
INVOICE
FROM ACCOUNT1
WHERE DATE < (to_date('122003','MMYYYY'))
UNION ... (2 Replies)
Hi, I need somebody's help with sorting data with awk.
I've got a file:
10 aaa 4584
12 bbb 6138
20 ccc 4417
21 ddd 7796
10 eee 7484
12 fff ... (5 Replies)
hI
I have file A
NSU30504 5 6 G 6
NSU3050B T 7 9 J
NSU30506 T I 8 9
NSU3050C H J K L Output:
NSU3050B T 7 9 J
NSU3050C H J K L
NSU30504 5 6 G 6
NSU30506 T I 8 9Video tutorial on how to use code tags in The UNIX and Linux Forums. (13 Replies)
Hi. I am not sure the title gives an optimal description of what I want to do. Also, I tried to post this in the "UNIX for Dummies Questions & Answers", but it seems no-one was able to help out.
I have several text files that contain data in many columns. All the files are organized the same... (14 Replies)
Hi ,
I have below data inside a file named ref.psv . I want to create a shell script which will do the below 2 points :
(1) sort the file content first based on the latest date which is the last column in the file (actual file its the 175th column)
(2)after sorting the file based on latest date... (3 Replies)
Hello people,
I am having problem to sort, sed and zero padding of column in csv file.
7th column only.
Input of csv file:
1,2,3,4,5,6,4/1/2010 12:00 AM,8
1,2,3,4,5,6,3/11/2010 9:39 AM,8
1,2,3,4,5,6,5/12/2011 3:43 PM,8
1,2,3,4,5,6,12/20/2009 7:23 PM,8
Output:... (5 Replies)
Hi,
i "tried" to sort data by date. So far, i used sed to take the data from the last and the actual month. Now, after changing the year it is not working properly.
i use:
GNU bash, version 4.2.45(1)-release (x86_64-suse-linux-gnu)
sed -n '/\//p' $Home/../scripte/pd_0.txt
y is a... (6 Replies)
Can i use 'column' command to get the required 3rd column output?
Input example:
1 2 345678 90
2 2 356 42
3 3 8265 55
Output required:
1 2 345678 90
2 2 356 42
3 3 8265 55
Basically i want the 3rd column to be justified to the right, instead of left.... (3 Replies)
Discussion started by: nurul_nadzirah
3 Replies
LEARN ABOUT DEBIAN
prima::detailedlist
Prima::DetailedList(3) User Contributed Perl Documentation Prima::DetailedList(3)NAME
Prima::DetailedList - a multi-column list viewer with controlling header widget.
SYNOPSIS
use Prima::DetailedList;
my $l = $w-> insert( 'Prima::DetailedList',
columns => 2,
headers => [ 'Column 1', 'Column 2' ],
items => [
['Row 1, Col 1', 'Row 1, Col 2'],
['Row 2, Col 1', 'Row 2, Col 2']
],
);
$l-> sort(1);
DESCRIPTION
Prima::DetailedList is a descendant of Prima::ListViewer, and as such provides a certain level of abstraction. It overloads format of items
in order to support multi-column ( 2D ) cell span. It also inserts Prima::Header widget on top of the list, so the user can interactively
move, resize and sort the content of the list. The sorting mechanism is realized inside the package; it is activated by the mouse click on
a header tab.
Since the class inherits Prima::ListViewer, some functionality, like 'item search by key', or "get_item_text" method can not operate on 2D
lists. Therefore, mainColumn property is introduced, that selects the column representing all the data.
API
Events
Sort COLUMN, DIRECTION
Called inside sort method, to facilitate custom algorithms of sorting. If the callback procedure is willing to sort by COLUMN index,
then it must call "clear_event", to signal the event flow stop. The DIRECTION is a boolean flag, specifying whether the sorting must be
performed is ascending ( 1 ) or descending ( 0 ) order.
The callback procedure must operate on the internal storage of "{items}", which is an array of arrays of scalars.
The default action is the literal sorting algorithm, where precedence is arbitrated by "cmp" operator ( see "Equality Operators" in
perlop ) .
Properties
columns INTEGER
Governs the number of columns in items. If set-called, and the new number is different from the old number, both items and headers are
restructured.
Default value: 0
headerClass
Assigns a header class.
Create-only property.
Default value: "Prima::Header"
headerProfile HASH
Assigns hash of properties, passed to the header widget during the creation.
Create-only property.
headerDelegations ARRAY
Assigns a header widget list of delegated notifications.
Create-only property.
headers ARRAY
Array of strings, passed to the header widget as column titles.
items ARRAY
Array of arrays of scalars, of arbitrary kind. The default behavior, however, assumes that the scalars are strings. The data direction
is from left to right and from top to bottom.
mainColumn INTEGER
Selects the column, responsible for representation of all the data. As the user clicks the header tab, "mainColumn" is automatically
changed to the corresponding column.
Default value: 0
Methods
sort [ COLUMN ]
Sorts items by the COLUMN index in ascending order. If COLUMN is not specified, sorts by the last specified column, or by #0 if it is
the first "sort" invocation.
If COLUMN was specified, and the last specified column equals to COLUMN, the sort direction is reversed.
The method does not perform sorting itself, but invokes Sort notification, so the sorting algorithms can be overloaded, or be applied
differently to the columns.
AUTHOR
Dmitry Karasik, <dmitry@karasik.eu.org>.
SEE ALSO
Prima, Prima::Lists, Prima::Header, examples/sheet.pl
perl v5.14.2 2009-02-24 Prima::DetailedList(3)