开发者

SQL GROUPING QUERY - H2 DataBase

开发者 https://www.devze.com 2023-04-05 22:13 出处:网络
I have a table with items, their properties, and those properties\' values. I would like to construct a query that produces unique rows for each property having all the different values from 开发者_开

I have a table with items, their properties, and those properties' values. I would like to construct a query that produces unique rows for each property having all the different values from 开发者_开发百科the different items in a single row.

From ITEM PROPERTY VALUE

To PROPERTY item1Value item2Value item3Value ....

Has anyone solved this situation before?

Thanks in advance, regards!


sounds like you need to do PIVOT table. below is the link that explains it in very good details.

http://msdn.microsoft.com/en-us/library/ms177410.aspx

if you give your table definition with datatype i can help with query

0

精彩评论

暂无评论...
验证码 换一张
取 消