The type system in .NET or Common Type System (CTS) divides types into 2 categories:
Values Types
Reference Types
Value Types
These are simple data types that directly contain their data, for example:Integers
Floats
Enums
Structs
Reference Types
These types store references to objects. Reference type variables have the ability to refer to the same data, so two variables can point to same object and the object be manipulated...
Friday, 29 October 2010
Thursday, 28 October 2010
SQL: Format Dates

Formatting dates in T-SQL is generally a nuisance as no format date function exists. In the past I have seen many developers (including myself) use the DATEPART() functions to split the dates and then manually build up a date string.
Alternatively I have seen developers CAST() the date to format.
Recently however, I discovered the different...
Wednesday, 27 October 2010
SQL: Get the length of text, ntext & image
Ever needed to find the lengh of a ntext field in SQL only to be met with the following error message, whilst using the LEN() function?
This can be achieved by simply using the DATALENGHT() function. DATALENGTH is especially useful with varchar, varbinary, text, image, nvarchar, and ntext data...
Subscribe to:
Posts (Atom)