• thanks for this solution. i'm creating a repository DB for maintenance and handy scripts. some are for SQL server 2005 and wont compile as Sps in 2012, etc, so I am now saving scripts into a varchar max field in a table. the problem was, without creating an interface, there was no way to access the full scripts from the field easily.

    this SP has solved the problem! saved me writing an asp.ntet page and making the simple scripts db a pain to move around!