fetch records


suppose table contains list of 10 tables.i want contains of 1st table..how can that?

 

  declare @sql nvarchar(max)  select @sql = ''  select @sql = @sql + ' select * ' + quotename(table_name) + char(13) from excluded  print @sql -- test  execute (@sql) -- execute script  

 

i assumed field name contains table names in excluded table table_name. if it's different name, use instead of table_name in above script.


premature optimization root of evil in programming. (c) donald knuth

naomi nosonovsky, sr. programmer-analyst

my blog


SQL Server  >  Transact-SQL



Comments

Popular posts from this blog

Conditional formatting a graph vertical axis in SSRS 2012 charts

Register with Power BI failed

SQL server replication error Cannot find the dbo or user defined function........