Pivot SQL server 2008

sven2

Registered User.
Local time
Today, 15:01
Joined
Apr 28, 2007
Messages
297
Hello,

how can I make a pivot query in SQL server 2008?

This is the select query where an employee can hace more than 1 function. It would be nice to display all the functions of this employee on 1 line.

SELECT Employee.Employeenumber, Employeefunction.FunctionID
FROM Employee INNER JOIN
Employeefunction ON Employee.Employeenumber = Employeefunction.Employeenumber

Thanks in advance,
Sven.
 
Hello,

what do you mean by analytics? Is it the use of partition and rank?

Now it is os that in the table employeefunction I have 2 fields like employeenumber and employeefunctionID. An employee can have more than 1 function.

I want to display that information in 1 line for each eployee.

Is this possible with the commands partion and rank?

Best regards,
Sven.
 

Users who are viewing this thread

Back
Top Bottom