nested select/subquery

  • Hello,

    I'm having a problem with a nested/subquery select. This is what I'm trying

    there are 7 tables, each with a primary key. Table 7 was added after the first six and only has about half as many records. I need to query all the tables together against the primary key, but if table 7 doesn't have a listing for the key I still need to gather the data for the other six tables.

    thankyou for your time

    Steve

  • What you're looking for is "left outer join". Look it up in Books Online and you'll get exactly what you need.

    - 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

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply