Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi ,
I have 2 QVDs Temp and Temp2. Monthly Amount is in my Temp2 Table. My requirement is, For the Key values found in the Temp table the MonthlyAmount has to be calculated from Termstart to TermEnd Date (i.e to overwrite the Startdate and EndDate values in the Temp2 with TermstartDate and TermEndDate for the key Values from Temp) The MonthlyAmount for Key Value in the Temp2 remains same..
Please find the attached QVDs.
Please guide me to achieve this ..
Temp:
LOAD Key,
TermEndDate,
TermStartDate
FROM
Temp.Qvd
(qvd);
Temp2:
LOAD Key,
BuildingID,
UnitID,
ChargeTypeID,
StartDate,
EndDate,
MonthlyAmount
FROM
Temp2.Qvd
(qvd);
Try with this
Temp2:
LOAD Key,
BuildingID,
UnitID,
ChargeTypeID,
//StartDate, //Remove this field
//EndDate, //Remove this field
MonthlyAmount
FROM
Temp2.Qvd
(qvd);
left join
LOAD Key,
TermEndDate AS EndDate,
TermStartDate AS StartDate
FROM
Temp.Qvd
(qvd);
Hi Adimulam,
If I remove the Startdate and enddate I cant get the startdate and End Date for the values in Table Temp2.
Regards,
Alvin.