I have TSql Table with two columns , I have to convert Columns into rows, first column St2_vehicle_Software is always same and have fixed values , second column 201 will be constantly changing including the header , rows sequence will always stay same as well in both columns
so BCUA , BCUB are headers and will not have values version name MB04: FW-Version will remain same but value 04.06 might change
**
ST2vehicle software 201**
BCU A
MB04: FW-Version 4.06
CB09: FW-Version 4.06
NSDB-Version 11.11
BCU B
MB04: FW-Version 4.06
CB09: FW-Version 4.06
NSDB-Version 11.11
BCU C
MB04: FW-Version 4.06
I want the final out put like this , I have tried different pivto in tsql but didn’t work
VehicleSoftware VehicleSoftwareDetail TrainNumber Version
BCU A MB04: FW-Version 226 03.00
BCU A CB09: FW-Version 226 03.00
BCU A NSDB-Version 226 11.08
BCU B MB04: FW-Version 226 03.00
BCU B CB09: FW-Version 226 03.00
BCU B NSDB-Version 226 11.08
BCU A MB04: FW-Version 227 03.00
BCU A CB09: FW-Version 227 03.00
BCU A NSDB-Version 227 11.08
Redmond001 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.