webressurs
06-29-2007, 07:41 AM
Hi :)
I got a view that returns article information. One article har one or many article attributes, this is why my view return one or many records like this:
select * from myView
The View return 2 articles:
ID Publish start ArticleName TemplateID TemplateName AttributeName AttributeValue
4 22.05.2007 Article 1 1 Article Title Welcome
4 22.05.2007 Article 1 1 Article Ingress Hello
4 22.05.2007 Article 1 1 Article Body Cool
4 22.05.2007 Article 1 1 Article Info Yeah..
5 26.06.2007 Article 2 1 Article Title ByeBye
5 26.06.2007 Article 2 1 Article Ingress Ughhh
5 26.06.2007 Article 2 1 Article Body Nice
5 26.06.2007 Article 2 1 Article Info Arrrg
As you see it return 4 rows per article. This is because the Article template has 4 templateDefinitions. Another template can have more or less templatedefinitions. Is it possible to make a query based on this View that return 1 record for each article? Then each AttributeName shall be a column name, and the attributeValue shall be the value for this Column.
This is really hard to make, ugh!!!
I got a view that returns article information. One article har one or many article attributes, this is why my view return one or many records like this:
select * from myView
The View return 2 articles:
ID Publish start ArticleName TemplateID TemplateName AttributeName AttributeValue
4 22.05.2007 Article 1 1 Article Title Welcome
4 22.05.2007 Article 1 1 Article Ingress Hello
4 22.05.2007 Article 1 1 Article Body Cool
4 22.05.2007 Article 1 1 Article Info Yeah..
5 26.06.2007 Article 2 1 Article Title ByeBye
5 26.06.2007 Article 2 1 Article Ingress Ughhh
5 26.06.2007 Article 2 1 Article Body Nice
5 26.06.2007 Article 2 1 Article Info Arrrg
As you see it return 4 rows per article. This is because the Article template has 4 templateDefinitions. Another template can have more or less templatedefinitions. Is it possible to make a query based on this View that return 1 record for each article? Then each AttributeName shall be a column name, and the attributeValue shall be the value for this Column.
This is really hard to make, ugh!!!