Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.databases.ms-sqlserver    |    Notorious Rube Goldberg contraption    |    19,505 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 18,207 of 19,505    |
|    Henk van den Berg to Gene Wirchenko    |
|    Re: Stored Procedure Code Critique Reque    |
|    06 Apr 11 21:15:48    |
      XPost: microsoft.public.sqlserver.programming       From: hvandenberg@xs4all.nl              On 05-04-2011 23:26, Gene Wirchenko wrote:       > Dear SQLers:       >       > I have finished writing my first involved stored procedure. It       > makes strings nice. It works, but it might be better.       >       One thing I recommend is to always use BEGIN/END after an IF/WHILE, even       if there's only one statement to execute, see below.                     > -- Add back any leading or trailing spaces being kept.       > if @fTrimLead=0       > select @strLine=space(@cLeading)+@strLine       > if @fTrimTrail=0       > select @strLine=@strLine+space(@cTrailing)       >              --- SoupGate-Win32 v1.05        * Origin: you cannot sedate... all the things you hate (1:229/2)    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca