(Using MS SQL 2008 R2 or greater)
Need help making a view that gets the results from several tables.
(considering stored proc as an alternative, but prefer view)
"solc" table can have multiple rows that relate to each "sol" table row
"sol" table can have multiple rows that relate to each "so" table row
"so" table has one row per TranNo field which is what is used in the WHERE to get the results.
See attached image with tables and desired results.
(SELECT ... WHERE TranNo = '00000123')
Please note: I will be out of office for a week so I won't be able to look at any solutions for several days after creating this.
oops I forgot put in the example that the "sol" table does have a "SOKey" field to relate to the so.SOKey (so.SOKey = sol.SOKey)