Select TOP 10 A.ShipmentDate,A.Carrier, A.FromCityCode AS Origin, B.FullDesc AS ORIGIN, A.ToCityCode AS DestinationFrom A,BWhere B.CityCode=A.FromCityCode
I have two tables. One holds the data for shipments and the other holds data of all cities and states.Table AShipmentDateCarrierFromCityCodeToCityCodeItemID (int)Table BCityCodeFullDescItemID (int)The select statement above works if I am only referencing to receive output for ONE column (as in this case the origin). The moment I deviate from this statement I get all kinds of "wrong" results.What I'm trying to do is to have the result return the FullDesc of cities rather than it's stored CityCode. I need to do this for both the origin and the destination in the same query.Any ideas?