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

2008-05-14 Thread Robins Tharakan
Oops! Of course, I meant a sequence. *Robins* On Wed, May 14, 2008 at 2:10 PM, Harald Fuchs <[EMAIL PROTECTED]> wrote: > In article <[EMAIL PROTECTED]>, > "Robins Tharakan" <[EMAIL PROTECTED]> writes: > > > While we could always check for the query performance reasons, I > > rather think that th

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

2008-05-14 Thread Marcin Stępnicki
On Wed, May 14, 2008 at 10:40 AM, Harald Fuchs <[EMAIL PROTECTED]> wrote: > I think a sequence is much simpler: > > create temp sequence tmp; > select nextval('tmp') as rownum, >contactdate > from >myTable > where >contactdate > '2007-06-30 23:59:59' > order by >contactdate; I used

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

2008-05-14 Thread Harald Fuchs
In article <[EMAIL PROTECTED]>, "Robins Tharakan" <[EMAIL PROTECTED]> writes: > 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 > usi

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

2008-05-14 Thread Marcin Stępnicki
On Wed, May 14, 2008 at 1:54 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. I think that this should be h

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