Skip site navigation (1) Skip section navigation (2)

RE: Re: Top

From: pmiranda(at)vm(dot)com(dot)br
To: pgsql-admin(at)postgresql(dot)org
Subject: RE: Re: Top
Date: 2001-08-08 18:40:16
Message-ID: OF2543B006.23588FE5-ON03256AA2.00668BD3@vm.com.br (view raw or flat)
Thread:
Lists: pgsql-admin
----- Forwarded by Paulo Miranda/RJ/VMCS on 08/08/01 15:39 -----
                                                                                                                   
                    Paulo Miranda                                                                                  
                                         To:     "Michael Ansley (UK)" <Michael(dot)Ansley(at)intec-telecom-systems(dot)com>  
                    08/08/01 15:34       cc:                                                                       
                                         Subject:     RE: [ADMIN] Re: Top(Document link: Paulo Miranda)            
                                                                                                                   



Mike,

Thank you very much. After writing the first message, (cause I'm behind
schedule) I tried that and it worked fine. Thanks for the other tips,
they'll be very useful for me.

I wanna thank Colin, too, and ask him to forgive my mistake. TOP is, in
fact, a SQLSERVER's SELECT clause (or whatever they call it). I don't even
know if there's something that compares to this in Oracle.

In portuguese, we say "obrigado" for "thank you". From now on, I ask you to
allow me to use this expression instead of the one in english. (I know I'll
make some many questions to you...)

:)


Paulo




                                                                                                                                      
                    "Michael Ansley (UK)"                                                                                             
                    <Michael(dot)Ansley(at)intec-telecom-sy        To:     pgsql-admin(at)postgresql(dot)org, "'pmiranda(at)vm(dot)com(dot)br'"                
                    stems.com>                              <pmiranda(at)vm(dot)com(dot)br>                                                      
                    Sent by:                                cc:                                                                       
                    pgsql-admin-owner(at)postgresql(dot)org        Subject:     RE: [ADMIN] Re: Top                                          
                                                                                                                                      
                                                                                                                                      
                    08/08/01 05:54                                                                                                    
                                                                                                                                      
                                                                                                                                      






-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Anyway, it's a combination of ORDER BY and LIMIT:

SELECT * FROM table1 ORDER BY field1 DESC LIMIT 10;

or, if you want the bottom ten:

SELECT * FROM table1 ORDER BY field1 LIMIT 10;

Or, if you want the next ten:

SELECT * FROM table1 ORDER BY field1 LIMIT 10, 10;

or something to that effect.

MikeA

>> -----Original Message-----
>> From: Colin 't Hart [mailto:cthart(at)yahoo(dot)com]
>> Sent: 08 August 2001 08:17
>> To: pgsql-admin(at)postgresql(dot)org
>> Subject: [ADMIN] Re: Top
>>
>>
>> > Please, does anyone know if is there in Postgres's SQL language
>> > an equivalent for Oracle's TOP ?
>>
>> Ummm, Oracle's SQL doesn't have a TOP.
>>
>> Are you thinking of SQL Server?
>>
>>
>> Cheers,
>>
>> Colin
>>
>>
>>
>>
>> ---------------------------(end of
>> broadcast)---------------------------
>> TIP 1: subscribe and unsubscribe commands go to
>> majordomo(at)postgresql(dot)org
>>

-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 6.5.3 for non-commercial use <http://www.pgp.com>

iQA/AwUBO3D+BXympNV/C086EQLevwCgpxcbIiA4OWcjmXQhirB0g4Ts4wEAnjSv
WxaprcluB2uhv5gmtaM6rCbI
=jPE0
-----END PGP SIGNATURE-----


_________________________________________________________________________
This e-mail and any attachments are confidential and may also be privileged
and/or copyright
material of Intec Telecom Systems PLC (or its affiliated companies).  If
you are not an
intended or authorised recipient of this e-mail or have received it in
error, please delete
it immediately and notify the sender by e-mail.  In such a case, reading,
reproducing,
printing or further dissemination of this e-mail is strictly prohibited and
may be unlawful.
Intec Telecom Systems PLC. does not represent or warrant that an attachment
hereto is free
from computer viruses or other defects. The opinions expressed in this
e-mail and any
attachments may be those of the author and are not necessarily those of
Intec Telecom
Systems PLC.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.
__________________________________________________________________________






pgsql-admin by date

Next:From: Gary StainburnDate: 2001-08-09 08:29:41
Subject: Re: upgrading RPM query
Previous:From: Ragnar KjørstadDate: 2001-08-08 17:49:34
Subject: Re: upgrading RPM query

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group