0

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

Edited by danturn: n/a

1
Contributor
1
Reply
2
Views
7 Years
Discussion Span
Last Post by danturn
0

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')
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.