Solved

Generating tab delimited report

Posted on 2000-04-02
2
1,758 Views
Last Modified: 2012-08-14
I am trying to genearate a tab delimited report, using chr(9) between the select columns. select col1,chr(9),col2,chr(9)....

When I spool the output into a file the header does not get tab delimited. So the actual data appears to be moving away from the header. Is there a way to make the header tab delimted or is there an another way to achieve the same thing, so that I can get the both the header and the data starting at the same position. Please let me know if any one of you have got any ideas.

Thanks,
Subin
0
Comment
Question by:subingeorge
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 4

Accepted Solution

by:
sganta earned 100 total points
ID: 2678729
Hi,

You don't have to select the CHR(9) function in your select clause
for TAB delimited. you can do the following settings at the SQL prompt
or in your SQL file.

SET COLSEP '<PRESS TAB KEY>'

i.e

SET COLSEP '      '

Now you can select whatever you want from SQL, it will be delimited by
TAB.

Hope this helps you !
0
 

Author Comment

by:subingeorge
ID: 2681201
Your answer to my question is correct. But this does not work on SQL PLUS for NT or 98. For some reason SQL PLUS does not seems to identify the <TAB> key. It works fine with SQL PLUS through command prompt and also on UNIX. It also works with notedpad and vi editor. Thanks for the help!!!.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article started out as an Experts-Exchange question, which then grew into a quick tip to go along with an IOUG presentation for the Collaborate confernce and then later grew again into a full blown article with expanded functionality and legacy…
Truncate is a DDL Command where as Delete is a DML Command. Both will delete data from table, but what is the difference between these below statements truncate table <table_name> ?? delete from <table_name> ?? The first command cannot be …
This video shows syntax for various backup options while discussing how the different basic backup types work.  It explains how to take full backups, incremental level 0 backups, incremental level 1 backups in both differential and cumulative mode a…
This video explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question