DOH spelt thread name wrong... should be query!

This is surely simple...

this is the end of my query

where CCM0300.dbo.Device.tkModel= '72' AND 
CCM0300.dbo.NumPlan.DNOrPattern like '31455'
OR CCM0300.dbo.NumPlan.DNOrPattern like '38600'
OR CCM0300.dbo.NumPlan.DNOrPattern like '36305'
OR CCM0300.dbo.NumPlan.DNOrPattern like '36805'
OR CCM0300.dbo.NumPlan.DNOrPattern like '38285'

what this is meant to do is return the records that are type 72 AND contain any of the numbers below.

this seems to work exept that it doesnt return the first record 31455...

i'm guessing this is because it sees CCM0300.dbo.Device.tkModel= '72' AND
CCM0300.dbo.NumPlan.DNOrPattern like '31455' as one statement...

any advice?

Dan

DOH,
i made a typo.

it should have been like this:

where CCM0300.dbo.Device.tkModel= '73' AND 
(CCM0300.dbo.NumPlan.DNOrPattern like '31782455'
OR CCM0300.dbo.NumPlan.DNOrPattern like '30088600'
OR CCM0300.dbo.NumPlan.DNOrPattern like '31706305'
OR CCM0300.dbo.NumPlan.DNOrPattern like '31786805'
OR CCM0300.dbo.NumPlan.DNOrPattern like '31708285')
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.