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,205 of 19,505    |
|    Erland Sommarskog to Gene Wirchenko    |
|    Re: Stored Procedure Code Critique Reque    |
|    06 Apr 11 07:43:02    |
      XPost: microsoft.public.sqlserver.programming       From: esquel@sommarskog.se              Gene Wirchenko (genew@ocis.net) writes:       > I have finished writing my first involved stored procedure. It       > makes strings nice. It works, but it might be better.       >       > Have I, for example, missed out on functions that could have made       > it easier?              Kind of. While you can write this stuff in T-SQL, this is exactly why       Microsoft added the capability to put code written in .Net in SQL Server.              > I also do not know how SQL Server handles multi-line values. I       > am assuming there is a CR (or UniCode equivalent) to delimit lines. In       > case there could be LFs, I eliminate them in the line flagged       > "--*****TRY".              SQL Server does not really care much about lines at all. If you put CR-LF at       the end of the string, there's a CR-LF at the end of the string. If string       only has LF, that's it. Or only CR. It all depends on where the data comes       from. If you load a text file from Unix, there will be only LF. If you       run examples from SSMS there will probably be CR-LF, since SSMS in a Windows       application.              I do not have the time to look at the code as such for now.              --       Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se              Books Online for SQL Server 2005 at       http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx       Books Online for SQL Server 2000 at       http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx              --- 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