我想在delayElements()
中convert multiple rows to multiple columns
。我使用以下查询:
sql server 2017 (v17.6)
获得的结果如下所示:
我想得到如下结果:
换句话说,我想根据select
CapturedFrame.capturedFrame_id,
CapturedFrame.fileName,
LicensePlate.licensePlate_id,
CharacterName.characterName_id,
CharacterName.name
from
CapturedFrame
join LicensePlate on CapturedFrame.capturedFrame_id = LicensePlate.capturedFrame_id
join Character on LicensePlate.licensePlate_id = Character.licensePlate_id
join CharacterName on Character.characterName_id = CharacterName.characterName_id
order by
licensePlate_id, x0
每8行进行分组,并添加lp_id
和ch_id#
(#是从1到8的数字)作为列。
我如何得到这样的结果?