Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7628471
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T05:35:56+00:00 2026-05-31T05:35:56+00:00

I have a need to display a sequence number column in a table that

  • 0

I have a need to display a sequence number column in a table that lists the count of each record for a person in a Job history table. Each history record has a Job Start Date and the number should be listed in the chronological order of the dates.
This is how I want it to look-

EmployeeID SeqNo. JobStartDate
A0001        1     2006/02/02
A0001        2     2008/04/01
A0001        3     2009/03/01
A0002        1     2005/01/01
A0002        2     2005/04/01
A0003        1     2006/09/01
A0003        2     2007/01/01
A0003        3     2008/01/01
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T05:35:57+00:00Added an answer on May 31, 2026 at 5:35 am

    If you are using SQL Server 2005+ or any other version of SQL that supports ROW_NUMBER() and PARTITION then you can do something like this

    SELECT EmployeeID, 
        ROW_NUMBER() OVER (PARTITION BY EmployeeID ORDER BY JobStartDate) AS SeqNo,
        JobStartDate
    FROM [TABLE]
    

    The row_number creates a unique row based on the partition (which acts like a GROUP BY) and the ORDER BY.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a large database table that I need to display on a Windows
I have some hierarchical data that I need display as a table, can I
I have a bool value that I need to display as Yes or No
I need to display a list of dates, which I have in a table
I have a RSS feed i need to display in a table (its clothes
I have a fragment that I need to display on the screen. I want
I need to display all tables that have zero records. I tried, select *
I have a div that can display 3 images (in the background) each indicating
I have a need to display text that includes HTML tags etc and TTStyledTextLabel
I have lot of png sequences that I need to loop through and display

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.