Hello,
I am using SQL Server 2005. I have a stored procedure that requires a parameter at execution - employee name. When I type in any name like donald, mike, john then it works fine. But when I use name like Sarah-Lee with a hypen, it gives me the error even though I've declared the variable as varchar(100):
Incorrect syntax near '-'
Can someone please help?
thanks,
Kathy
I am using SQL Server 2005. I have a stored procedure that requires a parameter at execution - employee name. When I type in any name like donald, mike, john then it works fine. But when I use name like Sarah-Lee with a hypen, it gives me the error even though I've declared the variable as varchar(100):
Incorrect syntax near '-'
Can someone please help?
thanks,
Kathy