Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
Scal
Starting Member
24 Posts |
Posted - 2011-06-23 : 11:29:06
|
| Hi;To understand what I need, here is the table's I'm using diagram: [url]http://pascalc.nougen.com/stuffs/diagram.png[/url]I need to get a project's properties + all it's relation, all listed based on the corresponding relational tables' OrderNumber column.Let's say I need "Project Z", I want to get:- Project's BaseUrl, ... where ID = @ID- All testsuites associated to that project, listed by ProjectsToTestSuites.OrderNumber- All testcases associated to the matching testsuites, listed by TestSuitesToTestCases.OrderNumber- All testaction associated to the matching testcases, listed by TestCasesToTestActions.OrderNumberSo far, all my attempts are returning back results with mixed ordering. A testcase is mixed inside a testsuite it doesn't belong to and alike.I try to avoid using cursors (loop each relation in specific order required), tried the use of UNION but couldn't get it to work either.I have a "solution" / "workaround" using temporary table but that's probably not best either.Any advices?Thanks |
|
|
pduffin
Yak Posting Veteran
68 Posts |
Posted - 2011-06-28 : 21:31:56
|
| Could you add an example of the expected output please.Pete |
 |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
|
|
|
|
|