THE SQL Server Blog Spot on the Web
Welcome to SQLblog.com - The SQL Server blog spot on the web Sign in | Join | Help
in Search

Browse by Tags

All Tags » Functions   (RSS)
  • How to log when a function is called?

    This question came up today and here is one way of doing it. It requires running xp_cmdshell so this is probably not such a good idea.The problem with functions is that you cannot just insert into any table. INSERT, UPDATE, and DELETE statements modifying table variables local to the function.EXECUTE statements calling an extended stored ...
    Posted to Denis Gobo (Weblog) by Denis Gobo on May 8, 2008
  • Functions That Are Not Often Used: SIGN

    SIGN is one of those function which you almost never see used in code. Sometimes you are asked by the front-end/middle-tier developers to return a rowcount as well with the result set. However the developers want you to return 1 if there are rows and 0 if there are none. How do you do such a thing? Well I am going to show you two ways. the first ...
    Posted to Denis Gobo (Weblog) by Denis Gobo on February 12, 2008
  • Summer SQL Teaser #12 Numeric

    Hi and welcome to another fascinating SQL summer teaser. Summer it is except in Princeton where it was 50 degrees this week. There was no teaser last week because of a death in the family, I had to go to a wake and a funeral last week. That is why this teaser will be posted on a Thursday instead of a Friday this week ;-) look at these values ...
    Posted to Denis Gobo (Weblog) by Denis Gobo on August 23, 2007
  • C# IsNullOrEmpty Function In SQL Server

    Mladen Prajdic has created a SQL equivalent of the C# IsNotNullOrEmpty I looked at it and thought that there was way too much code Here is my version, you pass an additional parameter in to indicate whether you want blanks only to count or not  CREATE FUNCTION dbo.IsNotNullOrEmpty(@text NVARCHAR(4000),@BlanksIsEmpty bit) RETURNS ...
    Posted to Denis Gobo (Weblog) by Denis Gobo on June 14, 2007
Powered by Community Server (Commercial Edition), by Telligent Systems
  Privacy Statement