I am looking for a way to concatanate parameters
Posted on 2011-10-31
Hello, I am looking for a way to concatanate parameters in the following way:
@cname as varchar(6),
@mname as varchar(5)
DECLARE @cmname as varchar(12)
How would I concatanate @cname + '-' + @mname and send the values to @cmname?
I do not want the value of cmname to be changed by the user of the query or program but I would like that value of @cmname to be stored as a parameter to be used in a query that I am writing. How would I do this?