对于这样结构的表:
"Object Attribute" Table - Links objects with all of their attributes and values;
Object ID Attribute ID Attribute String Value ...
1337 123 Example Object Title
1337 124 Example Object Type
1337 125 Example Object Description
1337 126 Example Object Author
0001 123 (null)
0001 124 SomeType
0001 125 This is an example record
0001 126 Jiman
0002 123 Bar
0002 124 BarType
0002 125 This is another
0002 126 Jiman
编辑:属性 ID 具有以下映射:
Attribute ID Attribute Name
123 Title
124 Type
125 Description
126 Author
我将如何编写返回一组转置数据的 Oracle 查询,其中 Title 字段为 NULL?
示例输出:
ID Title Type Description Author
0001 (null) FooType This is an example... Jiman
PIVOT 可以用来转置非聚合值(即那些字符串属性)吗?