spirit1 writes "Hi.My SQL server version:Microsoft SQL Server 2000 - 8.00.384 (Intel X86) May 23 2001 00:02:52 Copyright (c) 1988-2000 Microsoft Corporation Desktop Engine on Windows NT 5.1 (Build 2600: Service Pack 1) this is my problem.result of my query from multiple tabels, joins etc (select * ... order by CompanyId, JobTitle), the query has to have selected all of the colums (there are about 15 of them.)It looks like this:CompanyId JobId Job Employed Applicants1 1 title1 10 31 2 title2 2 11 5 title5 13 32 1 title1 6 6 2 5 title5 8 1 3 6 title6 3 2 4 1 title1 5 3 5 2 title2 6 4 5 4 title4 1 2 5 5 title5 3 2 6 2 title2 15 4
this is the result i'd like to get. other columns in original query are all data for a company, the only data that is different from row to row is JobId, Job, Employed, ApplicantsCId = CompanyIdJ = JobE = EmployedA = ApplicantsCId J1 E1 A1 J2 E2 A2 J3 E3 A3 Other Company data 1 title1 10 3 title2 2 1 title5 13 3 2 title1 6 6 title5 8 1 3 title6 3 2 4 title1 5 3 5 title2 6 4 title4 1 2 title5 3 2 6 title2 15 4
i got stuck on getting the first row in group from the query.i hope it's clear what i need to do?thanx"