Home » SQL & PL/SQL » SQL & PL/SQL » chr() + tab space + xls file format (unix, oracle 9i.)
chr() + tab space + xls file format [message #320712] Fri, 16 May 2008 01:18 Go to next message
fortunethiyagu
Messages: 94
Registered: December 2006
Member

Hi all,

(1)

Is it possible to leave a tab space between two fields selected from a table? For example,

 select 'sample1'<tab space>'sample2' from dual;


mentioned not to use space here. Do we have ascii or chr() code to leave the same?
---------------------------------------------------------------

(2)

Currently i am creating DAT file using a query, now they need to create a XLS file instead of DAT file. can we use.XLS instead of .DAT simply? Does UNIX support it?


thiyagu
Re: chr() + tab space + xls file format [message #320759 is a reply to message #320712] Fri, 16 May 2008 03:29 Go to previous messageGo to next message
Michel Cadot
Messages: 68722
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
(1) tab is chr(9)
(2) You can also use OWA_SYLK procedure.
See
http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:728625409049
http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:828426949078
http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:769425837805
Check which version is the latest one.

Regards
Michel


Re: chr() + tab space + xls file format [message #321349 is a reply to message #320759] Tue, 20 May 2008 00:39 Go to previous message
fortunethiyagu
Messages: 94
Registered: December 2006
Member

Thanks a lot yaar .. its rocking ..
I used chr(9) between every fields and spool on.
finally written everything to source.xls

ex :

spool c:\thiyagu.xls 
select sysdate || chr(9) || 'report' from dual
/
spool off


Excel file recognizing chr(9), since it is tab and displaying field in Separate cell.

Thanks once again ...

thiyagarajan palanisamy
Previous Topic: how to handle this problem
Next Topic: Information regarding dml operations
Goto Forum:
  


Current Time: Thu Dec 12 04:26:13 CST 2024