Connecting Tech Pros Worldwide Forums | Help | Site Map

criteria specifications

Newbie
 
Join Date: Dec 2008
Posts: 4
#1: Dec 4 '08
I have a several rows say
Location part # product code
105 E05 DX
104 1740 DX
104 2047 DX



I want a way to find a way in chriteria thet i can find all related info on these parts.
When i ran this query it only gave me the product code DX
I know you can use wild cards in queries but this is to specific and i would need all info related to the seperate part numbers if they were expanded.
is there a way to set chriteria to find all related numbers of my list using the first 3 characters, so it will give me any other part number product code that even contain say E05.

have a several rows say
Location part # product code
105 E05 DX
106 E055 RX
104 1740 DX
105 1740-567 FX
104 2047 DX

Expert
 
Join Date: Jul 2008
Location: Maryland
Posts: 1,175
#2: Dec 4 '08

re: criteria specifications


You can use the LIKE condition. See examples here:
SQL: LIKE Condition

If you want to match 4 different sets of numbers like that I think you could do
WHERE id LIKE '12345%' OR id LIKE '16564% or id LIKE etc.
Newbie
 
Join Date: Dec 2008
Posts: 4
#3: Dec 4 '08

re: criteria specifications


Ya that works the only thing is i have say 800 rows.

Is there a way to use the like for the characters in the feild with out being so specific

select *
FROM Part #
WHERE Part # LIKE ' ( say the first 4 character)

Or something that could be applied to the whole table without going throught each number?
Expert
 
Join Date: Jul 2008
Location: Maryland
Posts: 1,175
#4: Dec 4 '08

re: criteria specifications


I don't understand the question. That's exactly what LIKE '1234%' does. The select is going to have to look at the part number of each record in the table regardless.
FishVal's Avatar
Expert
 
Join Date: Jun 2007
Location: Israel
Posts: 2,584
#5: Dec 4 '08

re: criteria specifications


Hello, Cody.

You could try join the datasets on partial match.
Expand|Select|Wrap|Line Numbers
  1. SELECT [AllRecords].* FROM [AllRecords] INNER JOIN [SeveralRows] ON [AllRecords].[part #] Like '*' & [SeveralRows].[part #] & '*';
  2.  
Newbie
 
Join Date: Dec 2008
Posts: 4
#6: Dec 4 '08

re: criteria specifications


ya i understand that but i want the like'12345%' of all 800 part numbers... meaning.....

If i have all of the part numbers below i want the like'E05%', and the like'1740%' and the like'2047%' and so on and so on for all 800 part numbers.

E05
1740
2047
4521
21601
BM153
BM495
BM752
FCE45
FXD28
2248
2433
Newbie
 
Join Date: Dec 2008
Posts: 4
#7: Dec 4 '08

re: criteria specifications


thanks fishval ill try that!
Reply


Similar Microsoft Access / VBA bytes