Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Get a result from dynamically executed SQL
Message
From
24/03/2008 09:58:34
Issam Mansour
Jordan Business Machines
Amman, Jordan
 
 
To
All
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Title:
Get a result from dynamically executed SQL
Environment versions
SQL Server:
SQL Server 2005
Miscellaneous
Thread ID:
01304869
Message ID:
01304869
Views:
56
Hi,

How to get a result of the following dynamic syntax:-
set @posted = 'post_'+ @MONTHNO
set @sql =('select '+@posted+' from mumonth where year ='+@ACTIVEYEAR)
set @poststatus = (@sql)
Best Regards
Next
Reply
Map
View

Click here to load this message in the networking platform