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 |
|
Mondeo
Constraint Violating Yak Guru
287 Posts |
Posted - 2008-07-10 : 06:33:25
|
| I've got thisSELECT DISTINCT vehicleref,manufacturer,model,derivative,matrixfrontpageposition,studioimages FROM vwAllMatrixVehiclesAlso have a second table like thisVehicleRef Position1234 21235 41236 31237 1I want to use my first select statement but ORDER BY the position in the second table - is that possible.Thanks |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-07-10 : 06:43:41
|
| [code]SELECT DISTINCT v.vehicleref,v.manufacturer,v.model,v.derivative,v.matrixfrontpageposition,v.studioimages FROM vwAllMatrixVehicles vJOIN (SELECT VehicleRef ,Position FROM SecondTable)tON t.VehicleRef =v.vehiclerefORDER BY t.Position[/code] |
 |
|
|
|
|
|