Query

  • Thread starter Thread starter rorac
  • Start date Start date
R

rorac

Guest
Information: I need to sort three fields. This is to determine seniority of a work force. 1st field: trade seniority. If members are tied then the second field comes into play--company seniority. If still tied then the final field will come into play--the highest last four of the social security number.

Problem: I have one field with the entire social security number. So, how do I extract just the last four from the entire social security number and then sort it from high to low along with the other two fields from low to high.

I would appreciate any enlightment. Thanks
 
rorac,
I sure hope this isn't homework!
Seems like a very unconventional way to select senority??
If you have your query made, in a blank field in the query grid type;
Code:
=right([social security number],4)
or whatever the exact name of the field is.
then sort ascending in the sort box.
If you are starting from scratch;
query
new
select the table that contains the three fields
select trade senority and dbl click
sort ascending
select company senority and dbl click
sort ascending
select ss# and dbl click
uncheck the "show" box for ss#\
then in a blank field in the query grid type
Code:
=Right([ss#],4)
sort ascending

jim
 
Query Three field sort with extraction of social security #

Reply to Jim: This is actually how we determine seniority of the trades in my skilled trades unit at Ford Motor. I still don't have this working yet except for the last four. I will tinker around with the sample data base I put together and see if I can get it. I think the mask for ss might be the answer. If not, then I will get back with you. Thanks a lot, Jim.
 

Users who are viewing this thread

Back
Top Bottom