Site Sponsored By: SQLDSC - SQL Server Desired State Configuration
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.
Is there a way to achieve that? I have a query with a subquery and I want to assign the return from the query as a column name in the subquery.something like that where WorkDay is the return from the main query
as Convert(Varchar(10),WorkDay,110)
Thanks
madhivanan
Premature Yak Congratulator
22864 Posts
Posted - 2014-02-22 : 11:50:16
You need to use dynamic SQL. But why do you want to do this?MadhivananFailing to plan is Planning to fail