• I often created my queries and tested them before turning them into stored procedures. I still do this on occassion, however if I know this will be a stored procedure then I simply create it from the start as a stored procedure and work with it from there.

    This saves me the trouble of saving the query in Query Analyzer. The stored procedure is stored in the database and the database is backed up every night.

    Also, if you happen to need to use the datatypes image, ntext, or text you must create a stored procedure since you can't declare them as local variables. If someone knows a way around this I would love to know it but when I try to use the keyword DECLARE for a variable with datatype image, ntext, or text I get the following error:

    Server: Msg 2739, Level 16, State 1, Line 1

    The text, ntext, and image data types are invalid for local variables.

    Robert W. Marda

    SQL Programmer

    bigdough.com

    The world’s leading capital markets contact database and software platform.

    Robert W. Marda
    Billing and OSS Specialist - SQL Programmer
    MCL Systems