Question how can i make report based on a part of a cell?

mohandesno1

New member
Local time
Today, 17:24
Joined
Mar 10, 2012
Messages
2
dear Gents
looking for your help.:confused:
i've two tables and no common field.
what to do to sort using a small part of field cell because the only relation i have is the numerical part of cell in the two tables

example:

table 1 : MATRIX TAQ field

1PX1401A
1PZ1401B
1TX1401A



table 2: SAP TAQ field

1PX1401A



how can i make a report contains only the "1401" ?
in other word, in my report i want any numeric similarity between both tow fields to be showing beside each others.

by the way each table has more than 100,000 records.

thank you
 
You could use intermediate queries to pick out the common data.

Query 1 (named qMT):
Code:
SELECT *, MID(Field1,4,4) AS MTF FROM [MATRIX TAQ];
Query 2 (named qST):
Code:
SELECT *, MID(Field1,4,4) AS STF FROM [SAP TAQ];
Join query:
Code:
SELECT qMT.Field1, qST.Field1 FROM qMT INNER JOIN qST ON qMT.MTF = qST.STF;
 
thank you so much
i used the LIKE function between two fields and it works
 

Users who are viewing this thread

Back
Top Bottom