Msg#: 4530134 posted 9:49 am on Dec 21, 2012 (gmt 0)
Need some help.
I have the following syntax that returns a set of results where the minutes field equals '60'
MINUTES IS NOT NULL AND MINUTES='60'
this works fine for me, however i also have another syntax below which checks exactly like above but for all the minutes fields that equal 30 and have a description field that does not have the word Test in it.
MINUTES IS NOT NULL AND MINUTES='30' AND DESCRIPTION NOT LIKE '%Test%'
This also works fine. But i am trying to figure out a way to combine these two into one syntax. Any ideas?
Msg#: 4530134 posted 10:43 pm on Dec 26, 2012 (gmt 0)
Do you really need MINUTES IS NOT NULL when you're also specifying an amount for minutes? Seems unnecessary and confusing - unless for some reason you're finding that you need it I'd get rid of it. In that case this would be a simpler version of your query: AND ( MINUTES='60' OR ( MINUTES='30' AND DESCRIPTION NOT LIKE '%Test%' ) )