Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Generating tab delimited report

Posted on 2000-04-02
2
Medium Priority
?
1,775 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
2 Comments
 
LVL 4

Accepted Solution

by:
sganta earned 300 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

Veeam and MySQL: How to Perform Backup & Recovery

MySQL and the MariaDB variant are among the most used databases in Linux environments, and many critical applications support their data on them. Watch this recorded webinar to find out how Veeam Backup & Replication allows you to get consistent backups of MySQL databases.

Question has a verified solution.

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

Why doesn't the Oracle optimizer use my index? Querying too much data Most Oracle developers know that an index is useful when you can use it to restrict your result set to a small number of the total rows in a table. So, the obvious side…
When it comes to protecting Oracle Database servers and systems, there are a ton of myths out there. Here are the most common.
This video shows information on the Oracle Data Dictionary, starting with the Oracle documentation, explaining the different types of Data Dictionary views available by group and permissions as well as giving examples on how to retrieve data from th…
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…
Suggested Courses

926 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