Running Query batches in stored procedure

  • Me too, actually. The first change I would make the the script I posted would be to make it take a parameter for the alias I wanted to use.

    Incidentally, I've use a very similar script to generate code for C#, VB, etc...

    Matthew Galbraith

  • K. Wasn't sure how wierd i was being. As for your script, it's right on imo. I've had code generator scripts save me a ton of time on two projects in the past. I'm convinced they are useful in more than just theory.

  • I think that once you know how a language works and have a good understanding of it, then there's absolutely no reason in the world you should be typing everything out, unless it's short enough that it would take more time to execute/copy/paste/modify your script. I've done things from writing simple code generators, dynamic sql sps that use tables to get parameters, to abusing Excel and UltraEdit to write scripts. I'm paid for my brain, not my fingers. 😉

    Matthew Galbraith

  • Hehe - that was very well said.

  • to that end, take a look at SSCodeGen, available on this site at http://www.sqlservercentral.com/products/SSCodeGen/


    http://glossopian.co.uk/
    "I don't know what I don't know."

Viewing 5 posts - 16 through 19 (of 19 total)

You must be logged in to reply to this topic. Login to reply