Answered by:
Cross tab dynamic report

Question
-
Hi i have the following scenario we have a table named property with intPropertyId as pk
we have two more tables 1 is custom_tables custom_columns
custom_tables have table names
custom_columns columns have column names which are user defined column with property
and finally we have a custom_columns_values table as mapped table with custom_columns
so we have intPropertyid incolumnid varValue column as column value sql_variant against every property
now i have to create report which shows column names as column names and their values as values
i have tried pivot but its not working is there any way i can print dynamic or user defined columns as columns and their values as rows
Friday, October 15, 2010 10:49 AM
Answers
-
Here you can find very nice article with example about - Pivots with Dynamic Columns in SQL Server 2005.
Thanks,
Kapil Khalas - Database Developer- Marked as answer by KJian_ Friday, October 22, 2010 8:00 AM
Friday, October 15, 2010 1:10 PM -
Check out FIFTH EXAMPLE - dynamic pivot crosstab query
at the following page: http://www.sqlusa.com/bestpractices/training/scripts/dynamicsql/
Kalman Toth, SQL Server & Business Intelligence Training; SQL 2008 GRAND SLAM- Marked as answer by KJian_ Friday, October 22, 2010 8:00 AM
Wednesday, October 20, 2010 5:26 AM
All replies
-
try to create cross table report , report will do this automatically for you.
- Proposed as answer by Muhammad Abbas Wednesday, October 20, 2010 5:44 AM
Friday, October 15, 2010 12:06 PM -
Here you can find very nice article with example about - Pivots with Dynamic Columns in SQL Server 2005.
Thanks,
Kapil Khalas - Database Developer- Marked as answer by KJian_ Friday, October 22, 2010 8:00 AM
Friday, October 15, 2010 1:10 PM -
Check out FIFTH EXAMPLE - dynamic pivot crosstab query
at the following page: http://www.sqlusa.com/bestpractices/training/scripts/dynamicsql/
Kalman Toth, SQL Server & Business Intelligence Training; SQL 2008 GRAND SLAM- Marked as answer by KJian_ Friday, October 22, 2010 8:00 AM
Wednesday, October 20, 2010 5:26 AM