SQL help pivoting a single table

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP


SQL help pivoting a single table



I have a table containing several columns. There are multiple records that contain the same info except for the last column which is different. I need this last column to be combined into one row as additional columns. There will only be up to 3 additional columns (course, course2, course3). Below is my table layout. Thanks for any help.



Columns



EmployeeNumber
Email
LastName
FirstName
Address1
City
State
Zip
Phone
Certified
School
EmployeeType
BirthDate
Course
StaffNumber



The only column that will contain different data that I need to combine is Course. Otherwise, there will be several rows with identical data that I need to combine into one.





Sorry, I said last column, but it's the next to last column containing different info.
– Jeff Green
1 min ago





Please post your table schema, some sample data as INSERT statements. and the desired output using your sample data
– user1443098
30 secs ago





can you post some expexted results? How did you get course, course2, course3?
– scsimon
16 secs ago









By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

Arduino Mega cannot recieve any sketches, stk500_recv() programmer is not responding

Visual Studio Code: How to configure includePath for better IntelliSense results

C++ virtual function: Base class function is called instead of derived