I want some Moore

Blog about stuff and things and stuff. Mostly about SQL server and .Net
posts - 218, comments - 2281, trackbacks - 33

My Links

Advertisement

News

Hi! My name is 
Mladen Prajdić  I'm from Slovenia and I'm currently working as a .Net (C#) and SQL Server developer.

I also speak at local user group meetings and conferences like SQLBits and NT Conference
Welcome to my blog.
SQL Server MVP

My Books

SQL Server MVP Deep Dives 2
The Red Gate Guide to SQL Server Team based Development Free e-book

My Blog Feed via Email
Follow MladenPrajdic on Twitter


Users Online: who's online

Article Categories

Archives

Post Categories

Cool software

Other Blogs

Other stuff

SQL stuff

February 2007 Blog Posts

How Yahoo! Mail just made me laugh

I use Yahoo's mail service since 1996. But today i doscovered a new thing that made me laugh for half an hour. You have to use their ajax-ifed beta version. Click Compose and start clicking on the subject button. It auto generates the subject line. Here are some examples:  - LipSmack heartAttack girlie girl in a pink sleep sack  - How to Comb Your Curly Hair  - Is your coffee table decaff?  - Your earrings would make a great fishing lure!  - Quote me as saying I was misquoted.  - RE: four and twenty blackbirds baked in a pie  - Thank god and Greyhound she's gone  - Scratch golfer finds ball...

posted @ Tuesday, February 20, 2007 12:35 PM | Feedback (1) | Filed Under [ Misc ]

SQL Server 2005 Dedicated Administrator Connection

Since i've started playing with SQL Server 2005 i've come accross a few things that i think are very cool. I write them here so i don't forget about them :)) One of them is a Dedicated Administrator Connection (DAC) This is a special diagnostic connection which is used by DBA's to troubleshoot a server when the server is refusing other connections for whatever reason. DAC can be created with SqlCmd utility or in SSMS with admin:instance_name. Also only one DAC is allowed per instance. Remote network access must be enabled with SQL Server Surface Area Configuration   I think this is a very handy and usefull novelty.   You can find more...

posted @ Monday, February 19, 2007 9:18 PM | Feedback (4) | Filed Under [ SQL Server ]

How to store an incomplete date?

When doing apps that deals with date there almost always comes a question on how to store an incomplete date. For example:   Person A is born on 1980-02-17. Person B is born on 1980-02 <- The person doesn't know the exact day (This is acctually a real life scenario)   How to store this wisely in db? You can't really put a datetime DateOfBirth Column. I usually take 3 int columns (year, month, day) with constraints but i'm wondering...   Does anyone know of a better method?  

posted @ Saturday, February 17, 2007 2:05 AM | Feedback (9) | Filed Under [ SQL Server ]

How to Downgrade a Database from SQL Server 2005 to SQL Server 2000

I've seen this question pop up here, and i think it's usefull to post it here, since not every one reads the forums (you should! :)) We'll in this thread at the end of the first page there's a procedure on how to downgrade a db from SQL Server 2k5 to SQL server 2000. Enjoy it.

posted @ Thursday, February 15, 2007 10:45 AM | Feedback (12) | Filed Under [ SQL Server ]

T-SQL vs CLR: SQL Server 2005 group multiplication

Ever missed a Prod(columnName) function that works like a sum but it multiplies the column values? If you have then you probably know that there's a workaround using a bit of high school math knowledge about base 10 logarithms. It goes like this: SELECT exp(sum(log(c1))) as MultiplicationResult FROM test   However this little helper doesn't yield correct results for a large enough set, because it goes from integer to decimal. So there's a possibilty of an error. This is also a perfect example of a user defined aggregate that can be implemented in CLR. And becuase there's no int to deciaml transition it yields correct results.   This...

posted @ Monday, February 12, 2007 12:22 PM | Feedback (9) | Filed Under [ .Net SQL Server ]

Help in getting nested triggers from your database

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: CREATE TABLE trTest1 ( id INT, NAME VARCHAR(50) ) GO INSERT INTO trTest1 SELECT 1, 'NAME 1' UNION ALL SELECT 2, 'NAME 2' UNION ALL SELECT 3, 'NAME 3' UNION ALL SELECT 4, 'NAME 4' GO CREATE TABLE trTest2 ( id INT, NAME VARCHAR(50) ) GO INSERT INTO trTest2 SELECT 1, 'NAME 1' UNION ALL SELECT 2, 'NAME 2' UNION ALL SELECT 3, 'NAME 3' UNION ALL SELECT 4, 'NAME 4' GO CREATE TRIGGER trigTest1 ON trTest1 FOR UPDATE AS UPDATE t2 SET id = i.id...

posted @ Friday, February 09, 2007 8:32 PM | Feedback (3) | Filed Under [ SQL Server ]

Powered by:
Powered By Subtext Powered By ASP.NET