Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
HI Experts,
I have one table in this i have number of columns are there those are like 1/15,1/16,1/17 ,2/15,2/16,2/17,3/15,3/16,3/17 and soon.
In this 1/15,
1 is the first week of 2015 and in 2/16 2nd week of 2016 and etc..
Now i want the output like 1/15,2/15,3/15,1/16,2/16,3/16,1/17,2/17,3/17 like that..
How i can sort those columns?
Thanks in advance..
Sort by expression from sort tab
=Num(SubField(WeekYear,'/',-1) & SubField(WeekYear,'/',1))
Where WeekYear is your FieldName.. Change the field name according to your need.
Try Sort by Expression with below expression
NUM(Right(Fieldname,2)&Num(Subfield(Fieldname,'/',1),'00'))
Hi.
Try this. It works.
change your field format as below.
load date(date#(Weekyear,'M/YY'),'M/YY') as Weekyear
from table.qvd;
Now in the list box go to Properties --> Sort --> check "Numeric Value --> Ascending"
It will Sort it automatically. Just Simple.
Hi,
If you want to do it at the script level,
table:
LOAD * INLINE [
Weekyear
1/15,
1/16,
1/17 ,
2/15,
2/16,
2/17,
3/15,
3/16,
3/17
]
;
NoConcatenate
table1:
load date(date#(Weekyear,'M/YY'),'M/YY') as Weekyear
resident table;
NoConcatenate
table2:
load Weekyear resident table1
order by Weekyear asc;
drop table table1;
drop table table;