X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 1486C9FA5E6 for ; Fri, 26 May 2006 07:12:18 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 77199-05 for ; Fri, 26 May 2006 07:12:12 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from svr4.postgresql.org (svr4.postgresql.org [66.98.251.159]) by postgresql.org (Postfix) with ESMTP id 24E9B9FA5E2 for ; Fri, 26 May 2006 07:12:12 -0300 (ADT) Received: from mobile-elab.com (dsl-53.230-225.indo.net.id [202.53.230.225]) by svr4.postgresql.org (Postfix) with ESMTP id 5C4B35B0B83 for ; Fri, 26 May 2006 10:12:07 +0000 (GMT) Received: from andi ([192.168.1.28]) by mobile-elab.com (mobile-elab.com) (MDaemon.PRO.v8.1.3.R) with ESMTP id md50000104372.msg for ; Fri, 26 May 2006 17:10:12 +0700 From: "andi" To: Subject: Re: PLEASE help ME , HOW TO GENERATE PRIMARY Keys on the fly Date: Fri, 26 May 2006 17:11:26 +0700 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0025_01C680E7.6C54B810" X-Mailer: Microsoft Office Outlook, Build 11.0.5510 Thread-Index: AcaArL+62aZzv44jSz+lUtctU+jDZA== X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2869 X-Spam-Processed: mobile-elab.com, Fri, 26 May 2006 17:10:12 +0700 (not processed: message from valid local sender) X-MDRemoteIP: 192.168.1.28 X-Return-Path: andi@mobile-elab.com X-MDaemon-Deliver-To: pgsql-sql@postgresql.org Message-Id: <20060526101207.5C4B35B0B83@svr4.postgresql.org> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.25 tagged_above=0 required=5 tests=BAYES_50, FORGED_RCVD_HELO, HTML_90_100, HTML_MESSAGE, UPPERCASE_25_50 X-Spam-Level: X-Archive-Number: 200605/188 X-Sequence-Number: 25219 This is a multi-part message in MIME format. ------=_NextPart_000_0025_01C680E7.6C54B810 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit When I use this syntax select * from TESTER; I got TESTERIDPK TESTER_NAME 10 TESSSS 90 NAMAAAA 100 UUUUU In ms sql server 2005 I use this select rank() over(order by testeridpk ) as rank , * from tester; I get the result is like this, RANK TESTERIDPK TESTER_NAME 1 10 TESSS 2 90 NAMAAA 3 100 UUUUUUUU How in postgres sql I get the same result , please help me, because iam really frustating with this duty. Thank you ------=_NextPart_000_0025_01C680E7.6C54B810 Content-Type: text/html; charset="US-ASCII" Content-Transfer-Encoding: quoted-printable

When  I use this = syntax

select * from TESTER;

I got

 

TESTERIDPK  = TESTER_NAME

10          = TESSSS

90    =       NAMAAAA

100         = UUUUU

 

In ms sql server 2005 I use this =

select rank() over(order by = testeridpk ) as rank , * from = tester;

I get the result is = like this,

 

RANK   = TESTERIDPK       = TESTER_NAME

1     = 10            = ;    TESSS

2     = 90    =             = NAMAAA

3     = 100           &nbs= p;   UUUUUUUU

 

 

How in postgres sql I get the same = result , please help me, because iam really frustating with this = duty.

 

Thank = you

------=_NextPart_000_0025_01C680E7.6C54B810--