Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

LEFT JOIN

Status
Not open for further replies.

JoSno

Programmer
Apr 11, 2003
45
GB
Hi there,

I have two tables, one representing stations, one representing platforms. Platform records are linked to stations by a foriegn key STATION_KEY in the table platforms. Some stations have multiple platforms, some have none at all and here lies my problem.

I want to be able to display ALL the stations and their platforms, and if they haven't got any platforms then this should show NULL. So it would look something like:

PADDINGTON 1
PADDINGTON 2
PADDINGTON 2a
FENCHURCH 1
FENCHURCH 4
EUSTON NULL
KINGS CROSS 3
KINGS CROSS 5
...

Is it possible to this is one simple join or union? I'm sure it is as I'm sure I've done it before but I can't remember.

Cheers!
Jo
 
Never mind, I've done it now, cheers for reading this!

Jo
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top