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 →
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 →
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 →
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 →
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 →
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 →
If there can be a culture insensitive format for dates (yyyymmdd) then why is there no such thing as a culture insensitive format for decimals?
I suggest a use of # or ~ instead of the decimal separator in update and insert scripts only.
Read more →
I've seen this technique a few months ago on a local MS event called NT Conference presented by Slovenian MVP Dejan Sarka. However i haven't seen him blog about it yet (a shame) so after seeing this post by co blogger David Moloney here on SQLTeam blogs in this post about EAV i decided to give this little thing a go by myself.
Read more →
DMV's are one of the most usefull features in SQL Server 2005.
There are 2 that I like more than others because they can give you information about executed SQL statements without the use of SQL Profiler tool.
Read more →
I've written about bulk insert methods for text files in sql server 2005. .Net 2.0 brings the SqlBulkCopy Class in System.Data.SqlClient namespace. Speed wise it can't even compare to native sql server methods but it's usefull if it's the only viable solution.
Read more →
I've come accross this white paper that explains how SQL Server 2005 can be used to support row- and cell-level security.
Preety interesting reading.
More here.
Legacy Comments
Richard Lees
2007-07-07
re: Implementing Row- and Cell-Level Security in Classified Databases Using SQL Server 2005 download whitepaper
Read more →
In this thread it's shown how to export query results to excel File using OpenRowset. The problem with this is that you have to create an excel file with columns. For me that is simply unacceptable because i had to export any query result to excel and having to make an excel file for each query is simply ridicolous.
Read more →
Well i've done some more testing of bulk import methods i described in my previous post. The difference between previsous tests and these tests are these: 1. Database recovery model was set to Bulk logged.
Read more →
In a previous post I explained where an SSIS FastParse option can be found when importing data from Flat files. I finally had some time to explore all four of SQL Server 2005 Bulk import utilities.
Read more →
In a previous post I explained where an SSIS FastParse option can be found when importing data from Flat files. I finally had some time to explore all four of SQL Server 2005 Bulk import utilities.
Read more →
If there was one thing that was going preety steadily on my nerves in VS2005 was region collapsing/opening with mouse. So i was determined to find a shortcut for it.
Read more →
I've stumbled accross this post today that explains the Rozenshtein method of pivoting data.
It's quite interesting. I haven't seen the SIGN() function being used at all in SQL server in practice yet so this is kind of cool if you ask me :)
Read more →