Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> GROUP & NON-GROUP together?

GROUP & NON-GROUP together?

From: <fpuhan_at_my-dejanews.com>
Date: Sat, 13 Feb 1999 04:49:15 GMT
Message-ID: <7a3089$iac$1@nnrp1.dejanews.com>


Pardon me if this has been asked before. I'm attempting to teach myself SQL* Plus.

I'd like to be able to perform something along this line:

column date_var noprint new_value today column instnc noprint new_value curr_sid ttitle left 'Date: ' today center 'Triggers' right curr_sid

select

  t.owner,
  t.trigger_type,
  t.trigger_event,

  to_char(sysdate,'MM/DD/YY') date_var,   i.instance instnc
from
  sys.dba_triggers t,
  v$thread i
group by
  t.owner,
  t.trigger_type
/

but I receive the error message
ORA-00979 not a GROUP BY expression

if I add to the 'group by' clause
  i.instance

the query completes but my ttitle variables remain blank.

If I make a separate query such as

select
  to_char(sysdate,'MM/DD/YY') date_var,   i.instance instnc
from
  v$thread
/

the finished product (report) has the proper ttitle, but I wind up with duplicate report ttitles. I can 'set term off' and hide it from the screen display, but not the printed report.

Is there a way to do what I've attempted to explain here?

Thanks in advance.

-----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own Received on Fri Feb 12 1999 - 22:49:15 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US