ฉันมีฟิลด์หลายค่า
<arr name="colors">
<str>Blue</str>
<str>Red</str>
<str>Orange</str>
<str>Pink</str>
<str>Violet</str>
</arr>
กรอกดังนี้
<entity name="pub_attributes" query=" SELECT name [description] FROM dbo.Colors">
<field name="colors" column="description" />
</entity>
และฉันต้องการฟิลด์อื่นที่มีสีทั้งหมด แต่มีเพียงบรรทัดเดียวเท่านั้นที่คั่นด้วยช่องว่างสีขาวเช่น
<str name="Colors_All">Bue Red Orange Pink Violet</str>
ฉันจะทำสิ่งนี้โดยไม่ต้องเข้าถึงตารางสีอีกครั้งได้อย่างไร บางทีอะไรแบบนี้
<entity name="Properites_all" query="
DECLARE @all VARCHAR(MAX)
SET @all = ''
Select @all = @all + ... from '${pub_attributes.colors}'
UNION
Another SELECT that will add more info than just the colors
">
<field name="colors_all" column="description" />
</entity>