MSSQL select values in one row by group
-
Hey all, there is a MSSQL table with such data,
categoryName specificationValue unitName
Display 15.6 inch
Display LED, HD, Anti-glare NULL
Processor CORE I3 NULL
Processor 1005G1 NULL
Processor 1.2 UP TO 3.4 GHz
Graphics Card INTEL NULL
Graphics Card Intel UHD Graphics NULL
System Memory 8 GB
System Memory DDR4 NULL
Hard Disk 256 PCIe® NVMe™ SSD GB
Operating System Windows 10 Home NULL
Operating System 64 bit
Optical Drive DVD NULL
Physical 1.78 kgI need to get the following line (is it even possible?)
15.6inch LED, HD, Anti-glare | CORE I3 1005G1 1.2 UP TO 3.4 | INTEL Intel UHD Graphics | 8 GB DDR4 | Windows 10 Home 64bit | DVD | 1.78kg
To be honest, I don't really understand how to do this need your support thanks!
-
Hey all, there is a MSSQL table with such data,
categoryName specificationValue unitName
Display 15.6 inch
Display LED, HD, Anti-glare NULL
Processor CORE I3 NULL
Processor 1005G1 NULL
Processor 1.2 UP TO 3.4 GHz
Graphics Card INTEL NULL
Graphics Card Intel UHD Graphics NULL
System Memory 8 GB
System Memory DDR4 NULL
Hard Disk 256 PCIe® NVMe™ SSD GB
Operating System Windows 10 Home NULL
Operating System 64 bit
Optical Drive DVD NULL
Physical 1.78 kgI need to get the following line (is it even possible?)
15.6inch LED, HD, Anti-glare | CORE I3 1005G1 1.2 UP TO 3.4 | INTEL Intel UHD Graphics | 8 GB DDR4 | Windows 10 Home 64bit | DVD | 1.78kg
To be honest, I don't really understand how to do this need your support thanks!
Depends on your version of SQL Server. If it's 2017 or later, it's relatively simple. If it's earlier, not so much. See here: The SQL Server Equivalent to GROUP_CONCAT()[^]
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt AntiTwitter: @DalekDave is now a follower!
-
Depends on your version of SQL Server. If it's 2017 or later, it's relatively simple. If it's earlier, not so much. See here: The SQL Server Equivalent to GROUP_CONCAT()[^]
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt AntiTwitter: @DalekDave is now a follower!
thanks for fast reply! version 12 ((