Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
ssingh
Starting Member
25 Posts |
Posted - 2001-09-12 : 08:14:00
|
| I'm writing a stored procedure in which I pass a year(int) like 2002. In the stored proc I need to display the data in a table which will have column names asSCORES 2002, SCORES 2001 etc.I want to pass @year parameter to the stored proc and then append it to 'SCORES '. Something like:SELECT[scores_current] AS 'SCORES ' + CAST((@year) AS VARCHAR(4)).....INTO FINAL_TBLFROM #temp_tblBut it is not working. Please let me know if there is a way to do it. |
|
|
|
|
|