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 |
seed
Starting Member
3 Posts |
Posted - 2015-02-26 : 11:44:42
|
hi all,i am writing an sql query on formula one teams.each team has two drivers,i am trying to do a query which will return the drivers name as well as the team he races for if he is the lead driver, the sql i have below only seems to return half the lead driversSELECT DRIVER.NAME,F1_TEAM.NAMEFROM DRIVER,F1_TEAM (these are my tables)WHERE DRIVER.STATUS='LEAD' ANDDRIVER.DRIVER_ID=F1_TEAM.TEAM_ID |
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2015-02-26 : 12:23:30
|
Please show us sample data and expected output.Tara KizerSQL Server MVP since 2007http://weblogs.sqlteam.com/tarad/ |
|
|
|
|
|