Hi,
Table admin.tab has column which looks like this:
I need to order by this column and at the bottom add special character '26'. I need this special character because I need to export this data to TXT file and some third party application imports data to its application.
So the result should be:
Code:
aaa
bbb
ccc
'special character'
I wrote the following commands:
Code:
create table admin.tab (col1 char(10));
insert into admin.tab values ('aaa');
insert into admin.tab values ('ccc');
insert into admin.tab values ('bbb');
select col1 from admin.tab
union all
select chr(26) from sysibm.sysdummy1
order by 1;
But output puts special character at the top instead at the bottom:
Code:
'special character'
aaa
bbb
ccc
So how to order data and put the special character at the bottom?
My system: DB2 ESE v8 fp11 on Linux
Thanks,
Grofaty