Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi,
I have applied group by as:
A:
LOAD
max(ShiftStartDate) as ShiftStartDate,
max(ShiftEndDate) as ShiftEndDate,
REF_AgentName,
REF_acdId
FROM
D:\Qvd\Employee.qvd
(qvd) group by REF_AgentName,REF_acdId;
Now there are more fields also which I want to fetch.
how can I add fields in table A from same qvd.
Thnks
Use inner join to keep only records where the fields match in both tables:
LOAD
max(ShiftStartDate) as ShiftStartDate,
max(ShiftEndDate) as ShiftEndDate,
REF_AgentName,
REF_acdId
FROM
D:\Qvd\Employee.qvd
(qvd) group by REF_AgentName,REF_acdId;
inner join
load Field1, Field2,....etc
from D:\Qvd\Employee.qvd (qvd);
you can do a join to this table...with the main table
If I am applying join in this than that will affecting my data.
Actually I want to :
REF_acdId according to max(date) only , so that only unique REF_acdId can come.
It is coming by using group by but if I apply join than duplicate REF_acdId is coming.
hope you are understanding the problem.
Use inner join to keep only records where the fields match in both tables:
LOAD
max(ShiftStartDate) as ShiftStartDate,
max(ShiftEndDate) as ShiftEndDate,
REF_AgentName,
REF_acdId
FROM
D:\Qvd\Employee.qvd
(qvd) group by REF_AgentName,REF_acdId;
inner join
load Field1, Field2,....etc
from D:\Qvd\Employee.qvd (qvd);
Please post the sample data...