October 2004 - Posts

Set ANIS_NULLS
For something like
select * from foo1 where a not in (select a from foo2)
If anis_nulls is ON and if the table foo2 is empty no records from foo1 are selected.
If this comparision statement exits inside a stored procedure then ANSI_NULLS setting should be done before the compilation of the stored procedure, if the set statement is inside the procedure, the ANSI_NULL setting is not affected.
From BOL:
For stored procedures, SQL Server uses the SET ANSI_NULLS setting value from the initial creation time of the stored procedure. Whenever the stored procedure is subsequently executed, the setting of SET ANSI_NULLS is restored to its originally used value and takes effect. When invoked inside a stored procedure, the setting of SET ANSI_NULLS is not changed.

I never knew this. so when today there was a bug in a stored procedure I tried to debug it, I was not able to find anything wrong with it, since the same script was working on my local machine, after drilling it down to NULL comparision
found the above thing. so recompiled the sp with set options at the start before the create statement which solved the problem.
Also remember: The setting of SET ANSI_NULLS is set at execute or run time and not at parse time.

with 8 Comments
have a read here
with 3 Comments

Google has launched the desktop search engine Google Desktop search beta yesterday.
Google says that it is a desktop search application that provides full text search over all the files.
Seems to be a cool app, but I do have a few doubts about it... like it tracks all the activity done on the machine right from the normal work done to the emails recieved it tracks all the websites visited and stuff..... so how secure is it anyway?
anyone who get access to my machine knows what I was been doing what sites I have browsed ... is that the case??
I have downloaded the installable but not yet installed it cause it says that after installing it, it needs to index all the files on the hard disk which might take hours... so planning to install it tonight while leaving ... lets see how it comes up.
you can download it here

know more about google desktop search beta

with 4 Comments

Is anyone aware how to calculate the occupied size of a row in a table?

 

with 5 Comments