0

I'm trying to say if the event has '%webinar%','%network%' in the name include it "if" the date is after the 01-04-2015. I cant use "or" on a separate line as it ignores the date. Any help appreciated.

select 
    ,fsa.eventid
    ,sev.EventStart
    from
    event sev
    on 
    sev.eventId = fsa.eventid
    where sev.SNAP_EventStart >= '2015-04-01'
    and eventidname in ('%webinar%','%network%')
Kainix
  • 1,186
  • 3
  • 21
  • 33
yoda
  • 121
  • 1
  • 9

3 Answers3

2

please try

... where sev.SNAP_EventStart >= '2015-04-01'
    and (eventidname like '%webinar%' or eventidname like '%network%')
Pirvu Georgian
  • 657
  • 1
  • 12
  • 37
0

Try this way

SELECT  * 
FROM    table t INNER JOIN
        (
            SELECT  '%webinar%' Col
            UNION SELECT '%network%' col
        ) a ON t.COLUMN LIKE a.Col
Mukesh Kalgude
  • 4,814
  • 2
  • 17
  • 32
-1

Try this.

select ,fsa.eventid ,sev.EventStart from event sev on sev.eventId = fsa.eventid where sev.SNAP_EventStart >= '2015-04-01' and
( Patindex('%webinar%', eventidname) = 1 OR Patindex('%network%', eventidname) = 1 )