Though BEGIN and END blocks are not required when the IF condition contains only one line, I've seen some pretty wierd bugs with it. Try:IF (@Description = '')BEGIN SET @Description = NULLEND
Why bother will this at all? Use the NULLIF function (IMHO its one of the most underutilized functions in SQL Server):INSERT INTO inventory (item_name, item_description, notes) VALUES (NULLIF(@item_name,''), NULLIF(@description,''), NULLIF(@notes,''))
Owais
Make it idiot proof and someone will make a better idiot