Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I Have a table in the following format:
FirstName,LastName , Address,SSN
I want to take a resident of the above table and get the data only where SSN is maximum??????
Please help
Hi,
tempTable:
LOAD * INLINE [
FirstName, LastName, Address, SSN
a, a, a, 1
b, b, b, 2
c, c, c, 3
d, d, d, 3
];
tempTable1: //This table loads only one entry with max SSN
First 1 Load
FirstName as tempFirstName,
LastName as tempLastName,
Address as tempAddress,
SSN as tempSSN
Resident tempTable order by SSN desc;
LET maxSSN=FieldValue('tempSSN',1); //Getting the maxSSN
finalTable:
NoConcatenate //Make sure it does not concatenate with tempTable
Load *
resident tempTable where SSN=$(maxSSN);
Drop table tempTable;
Drop table tempTable1;
Is that what you are looking for?
Regards,
Xue Bin
Hi,
tempTable:
LOAD * INLINE [
FirstName, LastName, Address, SSN
a, a, a, 1
b, b, b, 2
c, c, c, 3
d, d, d, 3
];
tempTable1: //This table loads only one entry with max SSN
First 1 Load
FirstName as tempFirstName,
LastName as tempLastName,
Address as tempAddress,
SSN as tempSSN
Resident tempTable order by SSN desc;
LET maxSSN=FieldValue('tempSSN',1); //Getting the maxSSN
finalTable:
NoConcatenate //Make sure it does not concatenate with tempTable
Load *
resident tempTable where SSN=$(maxSSN);
Drop table tempTable;
Drop table tempTable1;
Is that what you are looking for?
Regards,
Xue Bin
Hi
thanks a lot