Forum Replies Created

Viewing post 1 (of 1 total)

  • RE: changing where clause operator dynamically

    This worked for me

    DECLARE @switch int

    declare @name varchar(60)

    set @name = 'ZNG AI%'

    Set @switch=0

    SELECT * FROM history

        WHERE 1 =

          CASE @switch

             WHEN 0 THEN CASE WHEN [name]...

Viewing post 1 (of 1 total)