|
|
|
|
Browse by Tags
All Tags » SQL Server 2005 » sqL Server 2000 (RSS)
-
“I sense you skipped SQL Server 2005 in you... Skipping SQL Server 2005 leads to a bigger learning curve... A bigger learning curve leads to not knowing the product as well...Not knowing the product as well leads to suffering..Running in compatibility mode 8.0 is the path to the darkside.. SQL Server 2008 (mode 10.0) is the force...May ...
-
A year in review, The 21 + 1 best blog posts on SQLBlog
Best posts according to me, it might have been the content or it might have been the comments. Either way here are the 21 + 1 posts I enjoyed the most. But wait the year is not over yet. Doesn't matter no one will write anything good till next year anyway (prove me wrong and I WILL update ...
-
You need to return NULL only if the value of your data is a certain value. How do you do this? There are three different ways.
NULLIFDECLARE @1 char(1)SELECT @1 ='D' SELECT NULLIF(@1,'D')REPLACEThis should not really be used, I just added it here to demonstrate that you can in fact use it.DECLARE @1 char(1)SELECT @1 ='D' SELECT ...
-
What do you think will be the output? DECLARE @d datetime SET @d = '20071010' SELECT DATEADD(yy, DATEDIFF(yy, 0, @d)+1, -1)
-
Drag And Drop Column Names In Query Analyzer you can save a lot of time by using this trick instead of typing all the column names of a table Hit F8, this will open Object Browser Navigate to DatabaseName/TableName/Columns Click on the column folder and drag the column folder into the Code Window Upon release you will see that all the column names ...
-
What will be the outcome of this script?First we create a table with a total of 6000 bytesNext we increase col2 from 1000 to 2000 bytes, this will give us a total of 7000 bytesFinally we add col3 which has 1000 bytes, this will give us a total of 8000 bytes
First run these two statements--Total size = 6000CREATE TABLE TestSize (Col1 ...
-
End of Support for SQL Server 2000 Service Pack 3a
Support for SQL Server 2000 Service Pack 3a (SP3a) will end on July 10, 2007.
Microsoft will end technical support on this date, which also includes security updates for this Service Pack. Microsoft is ending support for this product as part of our Service Pack support policy, found ...
-
First create this table CREATE TABLE Teaser (ID int) INSERT Teaser VALUES(1) INSERT Teaser VALUES(2) INSERT Teaser VALUES(1) INSERT Teaser VALUES(2) INSERT Teaser VALUES(NULL) Without running this try to figure out what the result will be SELECT COUNT(*), COUNT(ID), COUNT(DISTINCT ID) FROM Teaser For some more NULL summer fun you can read NULL ...
-
Mladen Prajdic has created a SQL equivalent of the C# IsNotNullOrEmpty I looked at it and thought that there was way too much code
Here is my version, you pass an additional parameter in to indicate whether you want blanks only to count or not
CREATE FUNCTION dbo.IsNotNullOrEmpty(@text NVARCHAR(4000),@BlanksIsEmpty bit)
RETURNS ...
-
I am still amazed at how many people still think that TRUNCATE TABLE is not logged. There is some logging going on but it is minimal, here is what Books On Line says:
TRUNCATE TABLE removes the data by deallocating the data pages used to store the table's data, and only the page deallocations are recorded in the transaction ...
|
|
|
|
|