arulmanicse
SSC Veteran
Points: 257
More actions
April 2, 2009 at 4:23 am
#219686
can any one tell me about how to write the code for the above case
Ramesh Saive
SSC-Insane
Points: 24275
April 2, 2009 at 4:54 am
#970531
DECLARE @Column VARCHAR(100),
@SQL NVARCHAR(MAX)
SELECT @Column = 'name',
@SQL = 'SELECT [' + @Column + '] FROM sys.tables'
EXECUTE( @SQL )
EXECUTE sp_executesql @SQL
--Ramesh
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply