Create proc Test @Items nvarchar(MAX) as begin Create table Products (Items nvarchar(MAX), Category nvarchar(255) ) INsert into Products (Items,Category) select top(20) Items,Category from dbo.new_products where Items Like '%'+@Items+'%' Update Products Set Category='Others' where Category=NULL Select * from Products Drop Table Products end
You need to check what you are having in Category column. It will be NULL or '' (Empty string)
If its Empty String then use this
Update #Products Set Category='Others' where Category=''
First Select the Record and see the Category.
© COPYRIGHT 2025 ASPSnippets.com ALL RIGHTS RESERVED.