December 1, 2009 at 1:49 pm
Obviously a host of ways, but the simplest method, and easiest to debug, would be to create 6 select statements, with WHERE clauses - one for each type, and Union them all together. In that way, each statement will access one other table only, and the Where clause will indicate which table is to be joined.
As said, many ways, but without knowing the size of the tables, etc, I prefer to look at the easiest method.
December 1, 2009 at 1:55 pm
Individual joins and union statements is how I'd initially go too. Easier and more performant than case statements in join clauses.
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
December 1, 2009 at 1:56 pm
Indeed I need to be careful since the table structure i am talking holds up account attributes and goes into a large value..Hence currently skipped that option. Any other way?...maybe I am still looking into it.
December 2, 2009 at 1:06 am
Try using Left Outer Join with all tables according their fields with Distinct Clause...
Viewing 4 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply