Forum Replies Created

Viewing 8 posts - 1 through 8 (of 8 total)

  • RE: Sum of top n rows

    I need on a further query. How to select TOP-N SQL statements between two periods.

    Something like if I would want to select 6th to 10th student in this following table.

    create...

  • RE: Sum of top n rows

    This would not work in SQL 2000, 'ROW_NUMBER' is not a recognized function name.

  • RE: Sum of top n rows

    I am not this expert in SQL to be able to discuss further on the design issues and flaws of the SQLServer 2000, but I am happy that this forum...

  • RE: Sum of top n rows

    Sorry doesn't work yet here. Two possibilities were brought up by Marcus - "case sensistive collation? " and Jeff - "left over #Temp table in the current connection"

    To be sure...

  • RE: Sum of top n rows

    Barry, I am doing this in SQL 2000, don't have 2005/08

    Using you code and changing the table name from yourtable to #temp,

    and using #temp table creation, I am getting this...

  • RE: Sum of top n rows

    Barry, your code has some issue and does not run in SQ 2000.

    The error given is

    Invalid column name 'studentID'.

    create table #temp

    (

    studentID int,

    subjectID int,

    subjectMark int

    )

    insert into #temp

    select 1, 1,...

  • RE: Sum of top n rows

    Thank you Arun, Your solution works just perfect.

  • RE: Sum of top n rows

    Its the same way as SQLServer brings out top 4 rows, deciding internally on the tie breaker.

    SELECT TOP 4 subjectMark

    FROM ...

Viewing 8 posts - 1 through 8 (of 8 total)