Hi - I'm picking up an error on the following query.Server: Msg 170, Level 15, State 1, Line 21Line 21: Incorrect syntax near '@table'.
For the following:Declare @Table Varchar(50)Create table #TempHort( Ent_nbr varchar(10) Not Null)Declare Tbl Cursor forSelect Descriptionfrom CL_HortOpen Tblfetch Next from Tbl into @Tablewhile @@fetch_status=0Begin Alter table #TempHort add @table char(50) Fetch Next from Tbl into @TableEndClose TblDeallocate Tbl
Help???You can't teach an old mouse new clicks.