Hi All.I have a question about how to best pull data for a report. I have a main table work_orders that has a related table called custom_fields. it is a 0 to many relationship. I am having a real problem trying to figure out the best way to display data in a report efficiently. What I want to do is display the work_order data and also all the custom_fields as a single row. I have attempted to use linq and I cant seem to figure out the best way to efficiently do this. I am relatively new to SQL Server and was wondering if anyone had an idea to efficiently do this.
Thanks in advance.
Jim
Creating a table with custom field columns
3 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Mahesh ChandRank #1 · 393.3K reputationPosted Apr 24, 2012, 8:44 AM EDT
Nitesh KejriwalRank #253 · 9.9K reputationPosted Apr 24, 2012, 5:19 PM EDT
SenthilkumarRank #387 · 6.5K reputationPosted Apr 24, 2012, 7:45 PM EDT
If you have more data in these two tables then go for the indexed view , because normal view work like normal query. It will execute the script and load into view.
If you are not using this joining of two tables in many places then you can go for joins and create the indexes wherever required.