Infiltrator64
Board Regular
- Joined
- Dec 19, 2004
- Messages
- 63
Hello all;
I need help modifying the code below so it only compares the last 3 digits of the login name field in the User table to the Code field in the Regions table when it does the outer join.
The login name field contains a variable length string for a user name that always ends in a 3 digit region code. The Code field only contains the 3 digit code name.
SELECT REGIONS.DESCRIPTION, USER.LOGIN_NAME
FROM USER LEFT JOIN REGIONS ON USER.LOGIN_NAME = REGIONS.CODE;
Thank you in advance of any help you can provide.
I need help modifying the code below so it only compares the last 3 digits of the login name field in the User table to the Code field in the Regions table when it does the outer join.
The login name field contains a variable length string for a user name that always ends in a 3 digit region code. The Code field only contains the 3 digit code name.
SELECT REGIONS.DESCRIPTION, USER.LOGIN_NAME
FROM USER LEFT JOIN REGIONS ON USER.LOGIN_NAME = REGIONS.CODE;
Thank you in advance of any help you can provide.