Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello All,
I have a question and this might be really simple, but here goes anyway:
I have a table which is like:
ID CO
01 A
02 A
03 A
01 B
04 B
03 C
04 C
So I want to create a QVD which will show
OriginalID OtherID
01 02
01 03
01 04
02 01
02 03
03 01
03 02
03 04
04 01
04 03
So if the ID has common CO, they should represent each other in OriginalID fields.
Any ideas anyone?
Thanks
off the top of my head:
temp1:
Load * Inline [
ID, CO
01, A
02, A
03, A
01, B
04, B
03, C
04, C
];
join Load ID as ID2, CO resident temp1;
temp2:
noconcatenate load ID as OriginalID, ID2 as OtherID resident temp1 where ID<>ID2;
store temp2 into temp2.qvd;
drop tables temp1,temp2;
off the top of my head:
temp1:
Load * Inline [
ID, CO
01, A
02, A
03, A
01, B
04, B
03, C
04, C
];
join Load ID as ID2, CO resident temp1;
temp2:
noconcatenate load ID as OriginalID, ID2 as OtherID resident temp1 where ID<>ID2;
store temp2 into temp2.qvd;
drop tables temp1,temp2;
Thanks Mr. Alejandro. I appreciate your feedback.