If you are talking about compiling TSQL into a table, and then running that TSQL later through C #, yes, it is possible. You will need to write a simple parser for TSQL script files (.sql). The analyzer will read the SQL script and in each GO statement will add the TSQL statement to the corresponding SQL Server table (the table can have two columns 1. Database to run against / process name to run against. 2. Query itself.). Then you can execute these TSQL blocks dynamically at runtime.
If you are talking about starting C #, which was compiled into a SQL Server data table, this is a great ball game, and I don't know how to do it (this is possible at all).
Hope this helps.
Moonknight
source share