by Rahul Singla | Oct 29, 2010 | Blog, Sql Server
The title sounds like related to a logging operation, isn’t it? Well yes, it is.In an existing logging operation, I needed to ensure that the number of log entries remained below a specified threshhold. And I came up with the following sql quickly: DECLARE...
by Rahul Singla | Oct 15, 2010 | .NET 2.0+, ASP.NET, Blog, Sql Server
I was thinking what title was more appropriate for this blog post, the one actually used above, or would “Sql Server as lock manager” would have been more appropriate.Today only, I had a situation where I needed to ensure that multiple instances of one of...
by Rahul Singla | Jan 3, 2010 | Blog, Sql Server
I recently had a situation where I needed to trim a custom character from the right of a string in Sql Server. Although Sql Server provides a RTRIM function, it can only trim spaces from a string.A quick search over web threw up some interesting results, but all of...
by Rahul Singla | Dec 9, 2009 | Blog, Sql Server
I found this the hard way out. Local variables in a T-Sql loop in Sql Server are not really local in the strict terms of a block-oriented programming language like C/C++.e.g. In C++, if you have the following:{syntaxhighlighter brush: cpp;fontsize: 100; first-line: 1;...
by Rahul Singla | Nov 19, 2009 | Blog, Sql Server
One problem I have always faced with Sql Server (more so, after I used MySql, and saw that MySql allows this) is to find a way to limit the number of rows being fetched in a SELECT query.Although Sql Server provides a ROWCOUNT statement & TOP clause for the SELECT...
Recent Comments