hi,this is my sample code:create table c_product(id int,name nvarchar(50))insert into c_productselect 1,'table' union allselect 2,'chair' union allselect 3,'tavolo' create table c_action(id int,name nvarchar(50))insert into c_actionselect 1,'invest' union allselect 2,'purchase' union allselect 3,'bid' union allselect 4,'sell'create table t_person(id_person int,id_product int,id_action int)insert into t_personselect 1, 1, 1 union allselect 1, 1, 3 union allselect 1, 2, 4 union allselect 2, 3, 1 union allselect 2, 3, 4
what i want is to get dynamic table with following outlook reading data from t_person with table structure from c_product and c_action.outlook should be like:data for t_person.id_person = 1\ | invest | purchase | bid | sell-----------------------------------------table| yes | NULL | yes | NULL chair| NULL | NULL | NULL | yestavol| NULL | NULL | NULL | NULLwhere if i add additional product or additional action, this table will have another row/column with belonging data. (both code tables c_product and c_action will not grow big; max 10 rows per each table). and this table will show only data for one person at the time.thank you for any hints.p.s.: i'm using sql server 2000 or 2005.