Re: [SQL] Add a ROWCOUNT to the output of a select.

2008-05-13 Thread Robins Tharakan
While we could always check for the query performance reasons, I rather think that this is an overkill for the purpose of mere line numbers. If such queries don't change frequently, you could be better off using a simple function that instead adds a 'rownumber' field to the output of the inner SQL

Re: [SQL] Add a ROWCOUNT to the output of a select.

2008-05-13 Thread Gurjeet Singh
On Wed, May 14, 2008 at 5:24 AM, Gavin 'Beau' Baumanis < [EMAIL PROTECTED]> wrote: > Hi Everyone, > > After spending some time searching through our good friend Mr. Google and > the mailing list I found a post that provided me with a query that does just > what I need. > > However, the query takes

[SQL] Add a ROWCOUNT to the output of a select.

2008-05-13 Thread Gavin 'Beau' Baumanis
Hi Everyone, After spending some time searching through our good friend Mr. Google and the mailing list I found a post that provided me with a query that does just what I need. However, the query takes FOREVER and although this is stated in the original mail I thought I would ask if there

Re: [SQL] Auto-formatting timestamps?

2008-05-13 Thread Mag Gam
Why not create a view? On Tue, May 13, 2008 at 11:58 AM, Peter Koczan <[EMAIL PROTECTED]> wrote: > Hi all, > > I'm undergoing a port from an old Sybase database to Postgres. It's > going surprisingly well, but I have a question regarding formatting of > timestamps. > > In Sybase, we get: > :> s

[SQL] Auto-formatting timestamps?

2008-05-13 Thread Peter Koczan
Hi all, I'm undergoing a port from an old Sybase database to Postgres. It's going surprisingly well, but I have a question regarding formatting of timestamps. In Sybase, we get: :> select date from checkoutdate; date 'May 1 2001 12:00AM' ... In Postgres: => select date from checkoutdate;