Hi, Im having problems joining these two queries. Can anyone push me in the right direction to get this to work.
The two queries are:
SELECT RegNo, ChassisNo, VehicleModel, CabType, BodyType, AncilliaryEquipment, StartDate,
ContractTermsMonths, EndDate, DateOfRegistration, RegistrationLetterCAP, RegistrationYearCAP,
CAPIDNo, UVCModel, AgreedResidualValue
From VehicleBuyBack
where ChassisNo = 'WMAL20ZZZ2Y093510'
and
select ChassisNo, CAPCleanCurrent,CAPCleanAtTermination
from FinancialValues
where ChassisNo = 'WMAL20ZZZ2Y093510' and financialYearMonth in (select max(financialYearMonth) from FinancialValues)
and CAPValueType = 'C'
These both produce a single record, however when i join them together i am getting duplicates...
Any help would be appreciated...
The two queries are:
SELECT RegNo, ChassisNo, VehicleModel, CabType, BodyType, AncilliaryEquipment, StartDate,
ContractTermsMonths, EndDate, DateOfRegistration, RegistrationLetterCAP, RegistrationYearCAP,
CAPIDNo, UVCModel, AgreedResidualValue
From VehicleBuyBack
where ChassisNo = 'WMAL20ZZZ2Y093510'
and
select ChassisNo, CAPCleanCurrent,CAPCleanAtTermination
from FinancialValues
where ChassisNo = 'WMAL20ZZZ2Y093510' and financialYearMonth in (select max(financialYearMonth) from FinancialValues)
and CAPValueType = 'C'
These both produce a single record, however when i join them together i am getting duplicates...
Any help would be appreciated...