Design a procedure that lists orders placed by customers with a customer name that includes externally entered characters

Design a procedure that lists orders placed by customers with a customer name that includes externally entered characters

Create proc Orders

(

@CompanyNamenvarchar(30)

)

as

select o.OrderID from Orders o where CompanyName like %@CompanyName%

It was a futile effort though, this is not working, dont know what to do

hope this helps

CREATE  PROCEDURE Orders @CompanyName nvarchar(30)
AS 
SELECT 
   o.OrderID 
FROM  
  Orders o 
WHERE 
  CompanyName like '%' + @CompanyName '%'

Thank you