- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Ordering Output of a select
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-03-2005 10:23 PM
тАО11-03-2005 10:23 PM
Ordering Output of a select
I'm doing a query via SQLPLUS on my Oracle
db and I re-direct the output to a file.
The output is full of blank and tab charset
how can I obtain an human output from my select ??
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-03-2005 10:30 PM
тАО11-03-2005 10:30 PM
Re: Ordering Output of a select
Or else you can write a script to remove spaces, tabs and make human readable format as your own.
Post select query and output file to give script.
~regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-03-2005 10:47 PM
тАО11-03-2005 10:47 PM
Re: Ordering Output of a select
you can start from this set of lines:
SET NEWPAGE 0
SET LINESIZE 10
SET PAGESIZE 0
SET ECHO OFF
SET FEEDBACK OFF
column FIRST format a4
column SECOND format a5
select FIRST, SECOND from TABLE;
Hope that help
regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-03-2005 10:53 PM
тАО11-03-2005 10:53 PM
Re: Ordering Output of a select
did you run "spool filename.lis" before running your sql statement?
if yes, can you confirm if you get the output on the screen when running the select statement without the spool command?
revert
kind regards
yogeeraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-04-2005 12:24 AM
тАО11-04-2005 12:24 AM
Re: Ordering Output of a select
I try to run it with your set statement but unfortunatelly they've not the effect that we want.
I run before the select statement the spool whit the file and in the spool file I've the same output with blank and tab charset..
This is one row of my output
XXXXX AAA BBB
XXXXX
ACCUMALE
PIAZZA SAN
DAMIANO, 1
XX-XXXXX
RO
XX.XXX.XXX.XX
FR
ROU
TER
XXXXXX XX_XX_XXXXXXXXX:XXXXXX XXX.XX.XXX.X ACCUMALE
FALSO
XX.XXX.XXX.XXX FALSO N
Thanks
Fabrizio
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-04-2005 12:53 AM
тАО11-04-2005 12:53 AM
Re: Ordering Output of a select
Another option may be using iSqlplus which display the output in a more readable grid format.
Or you could try
SET MARKUP HTML ON SPOOL ON
from sqlplus and output your data in html.
If you post your sql query and table definitions it may help to resolve your problem.
Patti
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-04-2005 01:12 AM
тАО11-04-2005 01:12 AM
Re: Ordering Output of a select
i beg your pardon but
i get some mess with my "SET" suggestions!
(as you posted ;-))
As Patti said, if you want use Sqlplus u
have to "re-draw" output with
SET and COLUMN
(for example :
column xxxx format a4
column yyyyy format a5,
to put data in 4 char. or in 5 char. space
column);
better, as Patti wrote, try with "SET
MARKUP HTML" (but again blanks could
find place in your output file).
regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-04-2005 02:01 AM
тАО11-04-2005 02:01 AM
Re: Ordering Output of a select
HTML Is a nice output there's a way to do it
in XML ??
Thanks a lot
Fabrizio
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-04-2005 09:08 AM
тАО11-04-2005 09:08 AM
Re: Ordering Output of a select
SQL> set tab off
SQL> set trimspool on
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-04-2005 03:58 PM
тАО11-04-2005 03:58 PM
Re: Ordering Output of a select
can you try the attached function that will allow you to dump your data in cvs format?
you can thus do the following:
create or replace procedure table_dump_csv
as
l_rows number;
begin
l_rows := dump_csv( 'select *
from your_table
where ...,
',', '/tmp', 'test.dat' );
end;
/
(assumes that the INIT.ORA parameter utl_file_dir is already set)
hope this helps!
regards
yogeeraj