|
|
|
|
Browse by Tags
All Tags » Functions (RSS)
-
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 ...
-
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 ...
-
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 ...
-
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 ...
|
|
|
|
|