Syntax problem - Msg 4145

  • I wrote this code :

    select Name, count(ID)

    from Players Join Brands on PlayerID

    where UnsubscribeDate between '2009-01-01' and '2010-01-01'

    group by ID, Name

    and i get this error message:

    Msg 4145, Level 15, State 1, Line 3

    An expression of non-boolean type specified in a context where a condition is expected, near 'where'.

    tried to rap my head around it, could use some help..

    thanks.

  • best guess..

    this...

    from Players Join Brands on PlayerID

    should be

    from Players Join Brands on Players.PlayerID = Brands.PlayerId

    HTH



    Clear Sky SQL
    My Blog[/url]

  • It works, thanks 🙂

  • Good stuff.

    Hope you understand your mistake.



    Clear Sky SQL
    My Blog[/url]

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply