[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
Re: Median gift
- Subject: Re: Median gift
- From: George Jansen <GJANSEN@AFLCIO.ORG>
- Date: Fri, 5 Jan 2001 16:14:59 -0500
If Oracle 7.1 supports in-line views (it has been a while, and I don't
recall), you can use one of them in conjunction with ROWNUM, for example
to get the median table name in your schema, you would
SELECT TABLE_NAME, RK
FROM (SELECT TABLE_NAME, ROWNUM AS RK
FROM USER_TABLES)
WHERE RK = (SELECT TRUNC((COUNT(*) + 1)/2) FROM USER_TABLES)
>>> tmorris@MAIL.HARTFORD.EDU 01/05/01 03:37PM >>>
I am trying to pull the median gift.
Has anyone written a function that they would share?
SQR/4.2.1/DEC ALPHA/OpenVMS 6.2/Oracle 7.1.3.2/Mar 20 1998
SCT Banner
*******************************
Therese M. Morris
Computer Systems Specialist
Development Office
Alumni House
University of Hartford
312 Bloomfield Avenue
West Hartford, CT 06117
Phone: 860-768-5113
Email: tmorris@mail.Hartford.edu
*******************************