Linker IT Software
Google
Web www.oraxcel.com
menubar-top-links menubar-top-rechts
Home Help Search Login
Welcome, Guest. Please Login.
SQL*XL: Database to Excel bridge litLIB: Excel power functions pack ExcelLock: Locking and securing your valuable Excel spreadsheets encOffice: Protect your Excel file easy and safe encOffice: Protect your Excel file easy and safe
Pages: 1
Format output columns (Read 2716 times)
Gerrit-Jan Linker
YaBB Administrator
*****




Posts: 75
Format output columns
06.11.06 at 13:23:21
 
Format output columns
 
SQL*XL user Joan from Ireland asked the following question.
 
Question:
How do I explicitly format an output column?
 
Answer:
Use the column format statement to do this. E.g.
 
column mycol format "0.000";
select mycol from mytable;

 
When running the column format statement this setting will remain active for the SQL*XL session. If you have certain columns that you want to always format differently you can make a set of column format statements and run them before you do any querying.
Whenever you execute a query in which a column name matches the name of the column you have explicitly formatted, it will be formatted that way.
 
Another use of this is a quick way to format. Consider this example:
 
column shortdate format "dd-mmm";
column longdate format "dd-mmm-yyyy";
 
select sysdate as shortdate from dual;
select sysdate as longdate from dual;
Back to top
 
« Last Edit: 12.11.06 at 11:18:52 by Gerrit-Jan Linker »  

Gerrit-Jan Linker
Linker IT Software
Email WWW Gerrit-Jan Linker   IP Logged
Pages: 1