Cant' seem to get right data from Query

J

juan

Hello,
I having problems with getting right data. I need to get
records that are equal in another table. But one of the
tables has +++, * Characters, which in that table are wild
cards. So what I did was I created two queries usign
leftpart function. Here are my two queries:
Query1 Prefixes Query2 Prefixes
Part8 Part8Character
Part7 Part7Character
Part6 Part6Character
Part5 Part5Character
Part4 Part4character
Part3 Part3 character.
I tried to create another query and drag the Part8 to the
Part8character and select Include all records from query1
and only those records from Queyry2 where fields are
equal.When I do it for one, it seems to work but when I
add all of them it doesn't. Hope I'm exlaining it right.
Please review and advise any help.
Thank you,
juan
 
M

Michel Walsh

Hi,


Have you tried something with the operator LIKE instead of a strict = ?

SELECT query2.*, query1.*
FROM query2, query1
WHERE query2.Prefixes LIKE query1.Prefixes & "*"



Hoping it may help,
Vanderghast, Access MVP
 
J

Juan

Hello Michael,
thanks. I'll try this. I acutally, run some append queries
to create a total and then create a query base on this. I
think looks fine. But trying to do least of if so will
take your suggestion.
Once again thanks,

JUAN
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top