• except if you use a Table Value UDF (User Defined Function), as this example shows:

    http://www.sqlservercentral.com/articles/Dynamic+SQL/65154/

    Best regards,

    Henrik Staun Poulsen

    http://www.stovi.com