2009年4月3日星期五

mysql style table output for oracle

use DBIx::Simple;
print DBIx::Simple->connect(q(dbi:Oracle:),q(/),{ora_session_mode=>2})->query(join(q(),<>))->text(q(box))

use PAR packer to pack it into some semi-bin and call it like this way :

echo 'select * from hr.departments where rownum<=5' | exesql
result:































DEPARTMENT_ID DEPARTMENT_NAME MANAGER_ID LOCATION_ID
10 Administration 200 1700
20 Marketing 201 1800
30 Purchasing 114 1700
40 Human Resources 203 2400
50 Shipping 121 1500

没有评论: