Partial Matching issue

  • Thread starter Thread starter martinmike2
  • Start date Start date
M

martinmike2

Hello, I am trying to have Access pick out and match the last 2
characters of a 5 character field entry so that I can assign a
seperate value via query. Here is my current query:

SELECT tbl_PayRates.Rate_Code, tbl_PayRates.PayRate
FROM EDVR, tbl_PayRates
WHERE (("Where [tbl_PayRates].[Rate_Code]" Like [EDVR].[A_RATE_CD]));


no matter where I place the WHERE clause I get no results.

DEMO DATA:

A_RATE_CD
98002
98005
68004

Rate_Code
02
03
04
05

PayRate
1 ( = 02)
2 ( = 04)
3 ( = 03)
4 (= 05)



Any help on this issue would be greatly appreciated.

-Mike
 
Try this --
SELECT tbl_PayRates.Rate_Code, tbl_PayRates.PayRate
FROM EDVR, tbl_PayRates
WHERE [EDVR].[A_RATE_CD] Like "*" & [tbl_PayRates].[Rate_Code];
 
Try this --
SELECT tbl_PayRates.Rate_Code, tbl_PayRates.PayRate
FROM EDVR, tbl_PayRates
WHERE [EDVR].[A_RATE_CD]  Like "*" & [tbl_PayRates].[Rate_Code];

--
KARL DEWEY
Build a little - Test a little



martinmike2 said:
Hello, I am trying to have Access pick out and match the last 2
characters of a 5 character field entry so that I can assign a
seperate value via query. Here is my current query:
SELECT tbl_PayRates.Rate_Code, tbl_PayRates.PayRate
FROM EDVR, tbl_PayRates
WHERE (("Where [tbl_PayRates].[Rate_Code]" Like [EDVR].[A_RATE_CD]));
no matter where I place the WHERE clause I get no results.
DEMO DATA:


PayRate
1 ( = 02)
2 ( = 04)
3 ( = 03)
4 (= 05)
Any help on this issue would be greatly appreciated.
-Mike- Hide quoted text -

- Show quoted text -

Worked perfectly, thanks a million Karl
 
Back
Top