Re: Resources for SQLPLUS & reporting

From: <billmil_at_my-deja.com>
Date: Mon, 02 Oct 2000 21:55:17 GMT
Message-ID: <8rb081$cgj$1_at_nnrp1.deja.com>


[Quoted] In article <OA5C5.15$b51.128_at_wdc-read-01.qwest.net>,   "Mike Dwyer" <dwyermj_at_co,larimer.co.us> wrote: > It might help if you explained the problem. After 6 months of use, you > should know sql*plus pretty well.

OK. But I was actually looking for more general tips-and-techniques stuff links. Like a tkyte page. I find that by trying new things in Sqlplus (i'm really an occasional user) I end up with results different than what I expect.

The problem:
I wanted output which looked like

     "Title 1"
<results of sql 1>

     "Title 2"
<results of sql 2>

I *thought* I could put another /ttitle betweeen the two sql statements to get this result.

Instead I got

     "Title 1"
<results of sql 1>

     "Title 2"
<results of sql 1>

     "Title 2"
<results of sql 2>

here's the sqlplus:
set verify off
set termout off
set echo off
set feedback off
set numwidth 6
ttitle skip center "Title 1"
/

--SQL 1
SELECT user_type_enum, COUNT(*) avail_count FROM users WHERE avail_for_ques_flag = 'T'
GROUP BY user_type_enum
/

spool output.lst
/

ttitle skip center "Title2"
/

-- SQL 2
SELECT user_type_enum, COUNT(*) unavail_count FROM users WHERE avail_for_ques_flag = 'F'
GROUP BY user_type_enum
/

spool off
/

exit;

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Mon Oct 02 2000 - 23:55:17 CEST

Original text of this message