Howto use if or case in SQL Server 2008 -


i new sql server , trying search cds or dvds through name , type(cd/dvd).

if not solved, show amount cds or dvds, have in stock.

declare @typ varchar set @name = 'kil' set @typ = 'dvd'  if (@typ 'dvd') begin     select titul.name titul      titul_id in (         select titul_id dvd         titul_id in (             select titul_id              titul              titul.name @name+'%'         )            , (dvd.solddate null)      )     group titul.name end 

but first step (if dvd..) not work.


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

javascript - jQuery .height() return 0 when visible but non-0 when hidden -