Viewing 15 posts - 1 through 15 (of 19 total)
The Microsoft article uses a strangely anthropomorphic explanation, "Emptyfile assures you that no new data will be added to the file". I'm happy to take DBCC's assurances any day but...
May 2, 2018 at 6:57 am
Hello Bevan,
In my haste I didn't try a null date, but you're right of course. Converting to varchar first means that no date or other type is presented to...
January 22, 2018 at 3:54 am
Thanks Bevan and John for the explanation.
I had a chance to use it in a real scenario today but I hit a snag with Null values. ...
January 19, 2018 at 6:27 pm
That's a brilliant idea. I often want to paste a small set of data into an email and it takes effort to make it readable even with SSMS's text output. ...
January 18, 2018 at 4:15 am
Excellent article - this technique is invaluable, especially for scheduling reports with varying periods.
Uncannily, after a long time thinking "there must be a better way to choose dates", I sat...
November 18, 2015 at 4:51 am
I have tried it now and you're right, Count(*) and Count(1) behave the same on version 2008 R2 (RTM) - 10.50.1600.1 (X64). I misread the QotD text.
February 18, 2015 at 3:22 am
Could this be a reason for preferring Count(1) over Count(*) - which is otherwise not an easy decision.
Edit: No indeed, I misread the question.
February 18, 2015 at 2:04 am
Does the Question of the Day of 2015-02-18 have a bearing on this discussion?
That is, COUNT(1) is the more reliable option because COUNT(*) will fail if the user is denied...
February 18, 2015 at 2:00 am
Did anyone mention that variables are also accepted by COUNT()?
DECLARE @i int
SELECT COUNT(@i) FROM [CountTest]
-- returns 0
DECLARE @i int = 1
SELECT...
January 30, 2015 at 2:47 am
Thanks Sean, the penny has dropped now.
September 30, 2014 at 7:54 am
Todd Reddinger (9/30/2014)
September 30, 2014 at 7:28 am
The mistake in the question was overlooking the fact that sys.syscolumns will have different contents in different databases.
But more than that, you couldn't guarantee the statement would return the same...
September 30, 2014 at 4:48 am
At least following the recent spate of RAND() questions I found it quicker to spot that the question had gone wrong. I'm beginning to feel I finally know...
September 30, 2014 at 4:37 am
TomThomson (9/29/2014)
SQLRNNR (9/29/2014)
andrew.ing (9/29/2014)
September 29, 2014 at 3:50 pm
Viewing 15 posts - 1 through 15 (of 19 total)