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 -> Re: Differences between Oracle RDBMS and MS SQL Server

Re: Differences between Oracle RDBMS and MS SQL Server

From: Tim Kannel <tdkannel_at_bitstream.net>
Date: Thu, 7 Dec 2000 20:25:11 -0600
Message-ID: <MPG.149a0231a9e848ba9896b0@news.bitstream.net>

In article <90ocpe$rkr$1_at_soap.pipex.net>, n-litchfield_at_auditcommission. gov.uk says...

> max(column) or min(column)?

> > BTW, for my purposes I don't need a general top-n solution;
> > top 1 would be sufficient. Anyone know of another method
> > that would work at least for the top 1 case?

Using max or min would not work for what I'm doing. The general form of the query (using the top-n syntax) is

	select top 1 x
	from tablename
	where y = 'some value'
	order by z

The column being returned (x) is not the same as the one being ordered-by (z). And in some cases multiple column values need to be returned from the desired row, not just one.

-- 
Tim Kannel
TCAP 3.1 - Captures console I/O to a file
ftp://ftp.simtel.net/pub/simtelnet/msdos/sysutl/tcap31.zip
Received on Thu Dec 07 2000 - 20:25:11 CST

Original text of this message

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