SQL Server 2008 R2 do Update in different Like

1

Many of us already know that (Like '% search%') serves us in sql server to search for keywords in this opportunity I have to do this:

UPDATE Table SET a.ItemID = 1000, a.type = 1, a.typeID = 0
FROM PS_GameData.dbo.CharItems a
INNER JOIN PS_GameDefs.dbo.Items b
ON b.ItemID = a.ItemID
WHERE b.reqLevel Between 31 and 60 -- pero en la siguiente linea necesito omitir un file cuya palabra clave es Rockero
and b.ItemName  DIFERENT Like '%Rokero%'-- ¿seria asi como lo tengo que hacer? osea el cambi  tiene que ser en todo menos en lo que contenga palabra Rockero.
    
asked by Juan Carlos Villamizar Alvarez 05.01.2017 в 15:05
source

1 answer

2

Try the following:

UPDATE Table SET a.ItemID = 1000, a.type = 1, a.typeID = 0
FROM PS_GameData.dbo.CharItems a
INNER JOIN PS_GameDefs.dbo.Items b
ON b.ItemID = a.ItemID
WHERE b.reqLevel Between 31 and 60 -- pero en la siguiente linea necesito omitir un file cuya palabra clave es Rockero
and b.ItemName NOT Like '%Rokero%'

Instead of DIFFERENT LIKE is NOT LIKE .

    
answered by 05.01.2017 / 15:10
source