sqlplus format settings for coloumns using perl in unix
Posted on 2010-08-13
I wrote a pearl script which basically connects to oracle db propmts for sql query, process it
and writes the queried data (tables)to a file.
Basically if the table is small it would display normally
name age sex lastname x y z
but if its a big table it would go like this
name age sex salary lastname x y
z f g h j
which is very hard to find out which data is of which field(coloumn)
i was able to format wordwrap for coloumns if i know the coloumnname.
"coloumn coloumn_name format a4 "
The problem is , i cant make these format settings for each and evert table,
So need a common command to format the coloumns such as set colsep( ' | ');