Hi all,
I was just wondering if it could be possible to excecute a statement
which is extracted from variabele, Example:
declare @SqlStatement varchar (100)
set @SqlStatement = 'select * from company'
the @SqlStatement contains the actual sql query, is it possible some
how to straight away convert it into excecution?
I've tried:
exec @SqlStatement
but exec or execute are meant to be for procedures
Any idea?