Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I need to create a resident table in my data model that contains all the rows in Temp2 that contain a duplicated LoadNumber. In this example, 1237, 100 ; 1237, 150.0 ; 1241, 75 ; 1241, 100.0 ; 1241, 125 ; 1241, 250. I have tried a variety of joins and experimented with EXISTS, but I'm not obtaining the table I need. Any suggestions will be greatly appreciated!
Temp2:
LOAD * INLINE [
LoadNumber, ManifestClass
1234, 50
1235, 100
1236, 75.0
1237, 100
1237, 150.0
1240, 250
1241, 75
1241, 100.0
1241, 125
1241, 250
];
Thanks,
Steve
Temp2:
LOAD * INLINE [
LoadNumber, ManifestClass
1234, 50
1235, 100
1236, 75.0
1237, 100
1237, 150.0
1240, 250
1241, 75
1241, 100.0
1241, 125
1241, 250
];
left join (Temp2)
load LoadNumber,
if(count(LoadNumber)>1, 'DUPLICATE', 'OK') as flag
Resident
Temp2
group by LoadNumber;
Temp2:
LOAD * INLINE [
LoadNumber, ManifestClass
1234, 50
1235, 100
1236, 75.0
1237, 100
1237, 150.0
1240, 250
1241, 75
1241, 100.0
1241, 125
1241, 250
];
left join (Temp2)
load LoadNumber,
if(count(LoadNumber)>1, 'DUPLICATE', 'OK') as flag
Resident
Temp2
group by LoadNumber;
Massimo,
That is excellent!
Thank you,
Steve