Hi,
We have a table collectiong all details of an item:
Here is a simplified representation of the tables
Tables:
items
------
item_id
item_details
------------
item_detail_id
item_id
item_detail_name
item_detail_value
That way, we can easily have a variable number of detail for the items (some can have 10 details, some only one).
I wondered if it was possible to build a row with all details of an item. It would then be possible to do
select * from details(5);
which would return all details of item with item_id 5:
serial | customer | type
0012 | Mr Doe | standard
because we have this :
select item_id, item_detail_name, item_detail_value from item_details where item_id=5;
item_id | item_detail_name | item_detail_value
-----------------------------------------------
5 | serial | 0012
5 | customer | Mr Doe
5 | type | standard
Thanks for your feedback.
Raph