againstTheWind
Programmer
I am trying to use variables declared inside my stored procedure to also make-up part of the column name.
Something like this perhaps:
I am not sure how concatenate the column alias and the variables.
Thanks!
Something like this perhaps:
Code:
ALTER PROCEDURE [dbo].[Cust_Recency] @RecentMonth tinyint, @Lastmonth tinyint
AS
select count(customerid) as [COLOR=red yellow]RecencyFrom@RecentMonthTo@Last[/color] month from
Customers
I am not sure how concatenate the column alias and the variables.
Thanks!