sorry...using 7.3.4 on aix.
-----Original Message-----
From: Ganesh Raja [mailto:[Email Address Removed] Thursday, May 30, 2002 12:24 PM
To: LazyDBA.com Discussion
Subject: RE: Help with SQL & Aggregate Functions
What is the Version of Oracle are u Using ...
Oracle ???
Best Regards,
Ganesh R
Tel : +971 (4) 397 3337 Ext 420
Fax : +971 (4) 397 6262
HP : +971 (50) 745 6019
============================================
Live to learn... forget... and learn again.
============================================
-----Original Message-----
From: Lisa R. Clary [mailto:[Email Address Removed] Thursday, May 30, 2002 8:13 PM
To: LazyDBA.com Discussion
Subject: Help with SQL & Aggregate Functions
I am having a hard time understanding why removing the line
"y.date_accrual_close is not null and" generates the error
"ERROR:ORA-24347: Warning of a NULL column in an aggregate function" and
returns 0 rows. I can re-write the query to get it to do what I need,
but I don't understand why this value has anything to do with the
count/group by....so what if it is null? there are other fields in the
regdba.study table that are null..
I did RTFM, but saw nothing that applied---date_accrual_close is neither
in the select nor in the group by.
Thanks for your input!
lc
select s.study_id, s.strat_code, s.short_name,
count(o.study_id)
from rdedba.on_study o,
regdba.reg_stratum s,
regdba.study y
where y.stat_center_code in (1,7) and
y.study_type_code <> 7 and
y.date_accrual_close is not null and
s.study_id = o.study_id(+) and
NVL(s.strat_code,0) = NVL(o.stratum(+),0)
and
s.study_id = y.study_id
group by s.study_id, s.strat_code, s.short_name
order by s.study_id desc, s.strat_code;
--------
Oracle documentation is here:
http://tahiti.oracle.com/pls/tahiti/tahiti.homepage
To unsubscribe: send a blank email to oracledba-[Email Address Removed] subscribe: send a blank email to oracledba-[Email Address Removed] the list archive: http://www.LAZYDBA.com/odbareadmail.pl
Tell yer mates about http://www.farAwayJobs.com
By using this list you agree to these
terms:http://www.lazydba.com/legal.html
--------
Oracle documentation is here:
http://tahiti.oracle.com/pls/tahiti/tahiti.homepage
To unsubscribe: send a blank email to oracledba-[Email Address Removed] subscribe: send a blank email to oracledba-[Email Address Removed] the list archive: http://www.LAZYDBA.com/odbareadmail.pl
Tell yer mates about http://www.farAwayJobs.com
By using this list you agree to these
terms:http://www.lazydba.com/legal.html
Oracle LazyDBA home page