You are currently browsing the monthly archive for January 2008.

A new control has been added to the excellent Krypton Toolkit, the Krypton Command. This allows you to group settings together and assign the group to a control. For instance, you could have the Text property set to Katmai then assign the command to a number of controls, each control’s Text property will be shown as Katmai. Making a change in the command will change all the controls. Its really about reducing code I guess for controls that have common or the same function. Excellent work. You can read more about it at the following link:

http://www.componentfactory.com/blog/index.php

According to numerous blog posts, SQL Server 2008 should now be out Q3 2008. I agree with the majority on this that I am happy for this to be delayed as long as we get a stable product. Of course , if this slips any further it could be renamed to SQL Server 2009 however based on the current CTPs I am sure this will not be the case.

Ok, not exactly SQL Server related but if any SQL Dev’s out there are interested in GUI development as well and do not know about this fantastic product then I thought it was worth letting you all know. The product is Krypton Ribbon. It mimics the Office 2007 ribbon almost perfectly, getting better on each release.  Support is excellent and they also have a Free Toolkit which includes replacement controls using Office 2007 themes .

You can download both from their website. If you wish to buy the Ribbon, it won’t break the bank either – its is the cheapest Ribbon control out there.

http://www.componentfactory.com

As SQL Server 2008 CTP6 is now with us I will be doing a post on the new integrated full text search (iFTS) shortly. iFTS includes a number of key changes including support for STOPLIST, mixed query performance, thesaurus improvements and of course full text indexes are stored and maintained inside SQL Server now. There is so much more to write about this and I intend to cover one or two features in separate posts.

Just a quick post to promote an excellent book on LINQ.  I downloaded early editions of this as it was being written and it is an excellent reference on LINQ. It is now available to buy in printed form so if anyone has the slightest interest in LINQ they should buy this book now. The book is LINQ in Action and can be purchased using the link below:

LINQ in Action (Paperback)

I found this screencast on MSDN’s Channel9, its a great addition to Simon’s post especially if you are a more visual person.

Table Valued Parameters

Simon Sabin posted an excellent article on SQL Server 2008’s Table Valued Parameters today. This saves me writing about it. To read his post, follow the link below:

Table Valued Parameters

If you have any particular feature you would like me to report on , please leave a comment.

Select

I will putting together a piece on Change Tracking over the next couple of days. This is a new feature that will be available in all editions of SQL Server 2008.

There are some interesting changes in the upcoming release of SQL Server 2008, some of which are powerful and sexy (“Spatial data” anyone?) and some have a less of a wow factor but never less are extremely useful. As a start, I wanted to write a special introductory post about the new date and time datatypes.

In the currnet (2005) and previous versions of Microsoft’s SQL Server there is no date specific datatype to store only the date element. You must use the DATETIME or SMALLDATETIME types. Working with the data sometimes became a chore, especially but not exclusivily when designing reporting solutions. We had to implement CAST and or CONVERT hacks to get around this. How many of us have had to write something along the lines of:

SELECT
OrderId, OrderValue
FROM
OrderItem
WHERE
CAST(CAST(FLOOR(DateEntered) AS FLOAT) AS DATETIME) >= @StartDate
AND < CAST(CAST(FLOOR(DateEntered) AS FLOAT) AS DATETIME) <@EndDate

Well, not anymore. Assuming of course you don’t want the time element of a date, it is now possible to use the new DATE datatype. The following example will output the date without the time element:

DECLARE @MyDt AS DATE
SET
@MyDt = GETDATE()
PRINT
@MyDt

The previous query can be simplified like this:

SELECT
OrderId, OrderValue
FROM
OrderItem
WHERE
DateEntered >= @StartDate
AND < DateEntered <@EndDate

Also , if you still need the granularity of the time the query is still a lot simpler than before:

SELECT
OrderId, OrderValue
FROM
OrderItem
WHERE
CAST(DateEntered AS DATE) >= @StartDate
AND < CAST(DateEntered AS DATE) <@EndDate

The range of this new DATE datatype is from 0001-01-01 through to 9999-12-31. The TIME datatype works in much the same way, it stores only the time element with a range of 00:00:00.0000000 through to 23:59:59.9999999 – providing a very useful type for certain applications.

Lastly, there is an unusual hybrid datatype called DATATIME2. Ok, not the greatest named datatype in the history of naming but it is very interesting. What this allows us to do is store a DATETIME with fractional granuluarity. For instance , do you want to store the date/time without the milliseconds? No problem for Mr DateTime2:

 

DECLARE @MyDt DATETIME2(0)
SET
@MyDt = GETDATE()
PRINT
@MyDt

These are the other available fractional settings you can use:

 

Fraction

Output

0

2007-10-28 22:11:20

1

2007-10-28 22:11:19.7

2

2007-10-28 22:11:19.70

3

2007-10-28 22:11:19.703

4

2007-10-28 22:11:19.7030

5

2007-10-28 22:11:19.70300

6

2007-10-28 22:11:19.703000

7

2007-10-28 22:11:19.7030000

 

I will be delving deeper into the datatypes in future blog posts.

 

 

 

 

SQL Server 2008 (“Katmai”) introduces something called Sparse Columns. What this allows you to do is to define a column that rarely contains data. When this is defined the column does not take up any space until it is used. An example of the code required to define the column is shown below.

CREATE TABLE Product

(

ProductId INT IDENTITY(1,1)
,ProductName VARCHAR (80)
,
ColourMatch INT SPARSE

)

I will blog more about this features once I have had the chance to play with the CTP 6.

 

January 2008
M T W T F S S
    Feb »
 123456
78910111213
14151617181920
21222324252627
28293031  

Tweets