var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Help with a query
I am trying to sort and group rows with another column to show the order. Eg:
J1 09/11/09 13:00
J1 09/11/09 12:00
J2 08/11/09 09:00
J2 09/11/09 10:00
J2 10/11/09 11:00
I want to select and get back
JOB DATE NUMBER
J1 09/11/09 12:00 1
J1 09/11/09 13:00 2
J2 08/11/09 09:00 1
J2 08/11/09 10:00 2
J2 10/11/09 11:00 3
I can sort the records but I do no know how to add the NUMBER column with a set of ordered numbers for each JOB. Thank you very much for any assistance
sql server 4.5? sql server 2000? sql server 2005?
the solution will depend on what version you're running
Hi, I am using SQL2008 and I am trying to execute the query from VB.NET at present. Thank you.
, ROW_NUMBER() OVER (PARTITION BY job ORDER BY [date] ASC) AS number
Thank you very much indeed -that is just what I needed. Excellent. Many many thanks.
I need my MT....uh, SQL 2k8