> On Mar 13, 2015, at 8:45 AM, Vishal Tiwari vishuals...@yahoo.co.in 
> [firebird-support] <firebird-support@yahoogroups.com> wrote:
> 
> 
> I have EmpCode column in my SQL
> 
> 
> Say for example, my sql returns total 100 records in that it returns 10 
> records for every employee. Here I would I display Row_Number as 1 for first 
> 10 records i.e. for first employee, then for next 10 records i.e. for second 
> employee Row_Number as 2, and so on. So finally Row_Number value should endup 
> with 10.
> 
How about a second context variable for the EmpCode and reset the row_number 
iff the EmpCode changes?  Or, if you'd rather number each row for an employee 
differently and start again at 1 for the next employee, increment the 
row_number unless EmpCode changes then reset to 1.

Sigh.  SQL used to be such a simple ugly stupid language....   Am I the only 
one who finds this sort of magic unreadable?

Cheers,

Ann
> 
> 
  • ... Vishal Tiwari vishuals...@yahoo.co.in [firebird-support]
    • ... 'Louis van Alphen' lo...@nucleo.co.za [firebird-support]
      • ... 'Martijn Tonies (Upscene Productions)' m.ton...@upscene.com [firebird-support]
        • ... 'Louis van Alphen' lo...@nucleo.co.za [firebird-support]
      • ... Vishal Tiwari vishuals...@yahoo.co.in [firebird-support]
        • ... Vishal Tiwari vishuals...@yahoo.co.in [firebird-support]
          • ... Vishal Tiwari vishuals...@yahoo.co.in [firebird-support]
            • ... Ann Harrison aharri...@ibphoenix.com [firebird-support]
              • ... Svein Erling Tysvær svein.erling.tysv...@kreftregisteret.no [firebird-support]
              • ... 'Louis van Alphen' lo...@nucleo.co.za [firebird-support]
                • ... 'Louis van Alphen' lo...@nucleo.co.za [firebird-support]
                • ... Vishal Tiwari vishuals...@yahoo.co.in [firebird-support]
                • ... Svein Erling Tysvær svein.erling.tysv...@kreftregisteret.no [firebird-support]
              • ... Mark Rotteveel m...@lawinegevaar.nl [firebird-support]
    • ... Mark Rotteveel m...@lawinegevaar.nl [firebird-support]

Reply via email to