if you don't know what nested trigers are read here.
Triggers are nested when a trigger performs an action that initiates another trigger.
So if you have 2 table where each has an after update trigger like:
Read more →
If you're reading this blog you're probably familiar with ADO.Net and it's SqlCommand object.
Now this SqlCommand object has a CommandTimeout property that specifies the number of seconds after which the command will terminate.
Read more →
A derivative is walking down the street and sees a hot function.
So he grabs her, takes her into the bushes and differentiates her once.
Little later he sees another function and differentiates her twice.
Read more →
I recently wanted to create a stored procedure that would be only in master database and get some information_schema stuff for the current database.
One requirement is that the sproc has s "sp_" prefix.
Read more →
Enums are a great tool. They give meaning to meaningless numbers.
I love using them as flags since it couldn't be simpler. So i always used the [Flags] attribute on my enums
Read more →
A SELECT tag is what a DropDowList in Asp.Net renders to in HTML and it's a standard web control.
If you ever had to pop up a DIV over it (a menu in most cases) then you know that in IE6 and below and FireFox 1.
Read more →
This document is a must read for any serious network admin and i do dare to say also for a DBA.
.Net developers are welcome to read it since it is usefull.
Read more →
UPDATE: This is now a part of a larger SSMS Add-In called SSMS Tools Pack
I thought I'd post something special as the last post of this year and i was thinking about what it would be.
Read more →
I was playing with some historical data (family tree) and i wanted to store data in sql server. When looking into family trees you reach the minimum datetime value of 1753-01-01 very soon.
Read more →
I've come across an interesting thing today that i didn't even think could be an issue:
Case senstive object names (tables, columns, triggers, views, etc....).
If your database is created with a Case Sensitive collation then all object names will be Case Sensitive.
Read more →
Having started programming in c/c++ i've always been used to casting between types using () operator:
int i = (int)x
With the coming of .Net framework ValueTypes and ReferenceTypes were introduced and we started hearing about boxing and unboxing.
Read more →
In a previous post I've shown how to use High precision timer.
That method had a drawback of working for whole server not distiguishing between connections.
So if you ran the time measurement in 2 different windows in SSMS the times would be incorrect.
Read more →
Lately i've been doing quite an amount of work with Exchange and WebDAV access to it.
Documentation on WebDAV and Exchange server is ok for simple tasks but if you want anything concrete done examples are impossible to come by.
Read more →
Update: I've created a muliti connection version which can be found here.
Usually time measuring in sql server is done in 2 ways: with the help of GetDate() function or with SET STATISTICS TIME ON.
Read more →
A coworker found this in code generated by Visual Studio 2005:
this.sqlSelectCommand2.CommandText = "SELECT columnName1, columnName2, columnName3, columnN" + "ame4, columnName5, columnName6 FROM MyViewFromMa" + "nyTables" Searching for MyViewFromManyTables is beautifull.
Read more →
I've come accross a video recently that was tagged with VeoTAG. I must say that IT IS AWSOME!
I can already see the uses in presentation videos.
No more searching for that 47th minute minute where there's something that you like.
Read more →
Since this blog is hosted i don't have access to it's source code. That means that i can't play with the source, can't add counters, can't have anykind of statistics etc.
Read more →
Well SP2 CTP for SQL Server 2005 is here. Amongst all things new and fixed bugs there's one that i wanted to see if it's any good.
That is the vardecimal storage format.
Read more →
I've seen a lot of confusion about the scope and lifetime of temporaray tables. While i think that ##global temp tables are clear, #local temp tables are a different story. They seen to sometimes work and sometimes not, especially when used with dynamic sql.
Read more →
here's a select. don't run it just look at it and think what it returns:
SELECT 123.654, 123d6, 123e4, '123'e4
ok now run it.
the results are:
(No column name) d6 (No column name) e4 123.
Read more →