last day (15 days later) » 

7:16 PM
hey hey
 
Not too long ago you posted a comment or answer to concatenate sys.objects or something like that without a cursor to make a dynamic sql string look like select blah from table1; select blah from table2; etc
i can't find that trick to save my life and forgot to save it
and i was pretty sure you didn't use for xml which is what intrigued me, do you remember that?
 
yeah pretty simple really. just use variable concatentation. It is somewhat of a hack but it works.
declare @asdf nvarchar(max) = ''
then
select @ASDF = @ASDF + 'select * from ' + name + ';' from sys.tables
 
ah yes....
makes a ton fo sense now
 
cool
 
I was sitting here trying to remember how the iteration happened when it didin't at all
 
7:20 PM
hehe once you do it yourself once you will never forget it
 
thanks a ton!
 
no problem mate. happy to help
 
cheers!
 

last day (15 days later) »