Viewing 15 posts - 706 through 720 (of 1,187 total)
DECLARE @a INT
DECLARE @b DATETIME
SET @a = @b
The above code executed successfully for me in SQL 2005 but gave the error listed in the answer when I ran it in...
September 1, 2010 at 8:21 am
My two cents (worth about a penny and a half at most 🙂 ):
Make sure you learn as much as you can about each possible job regarding how specialized it...
August 31, 2010 at 3:11 pm
Hugo Kornelis (8/31/2010)
webrunner (8/31/2010)
August 31, 2010 at 1:03 pm
Hugo Kornelis (8/31/2010)
webrunner (8/31/2010)
August 31, 2010 at 9:19 am
Thanks for the great question. The answer still seems counterintuitive to me - I expected that selecting COUNT(*) would return at least one row (the count result, whether 0 or...
August 31, 2010 at 7:34 am
mccork (8/25/2010)
The answer was almost obvious from the "do not run it on production server" recommendation.But, a good question for highlighting the pitfalls of "float".
That is what led me to...
August 26, 2010 at 8:21 am
hrvoje.piasevoli (8/23/2010)
Here's a tip:
Move the decimal point to the left by the negative number and then do a regular ROUND(d, 0). Applied to this it ends looking...
August 24, 2010 at 8:08 am
Thanks for highlighting this dilemma, Steve.
Others have (and I'm sure will) add more and better detail on other aspects of this question. But I just wanted to point out one...
August 24, 2010 at 8:04 am
mtassin (8/18/2010)
webrunner (8/18/2010)
What I am wondering is, if hypothetically this restriction were lifted and one could set the recovery model of tempdb to Full, what would be the impact of...
August 18, 2010 at 3:19 pm
mtassin (8/18/2010)
webrunner (8/18/2010)
August 18, 2010 at 2:16 pm
I'm grateful for the point. It was easy for me - which I can't say about too many questions, but I'm especially glad I didn't second-guess myself into a wrong...
August 18, 2010 at 9:13 am
I went 0 for 3 on the rounding questions. Scary. Well, what was really scary was that I didn't read through the ROUND documentation after the first question, which no...
August 17, 2010 at 8:49 am
Luke L (7/26/2010)
webrunner (7/26/2010)
I have one question, though. I've seen people show me queries where they...
July 26, 2010 at 9:01 am
bitbucket-25253 (7/26/2010)
Easy enough to find out ...
CREATE TABLE #T(userid INT)
INSERT INTO #T
SELECT 1 UNION ALL
SELECT 1 UNION ALL
SELECT 2 UNION ALL
SELECT 3 UNION ALL
SELECT 4 UNION ALL
SELECT 5...
July 26, 2010 at 8:56 am
Good question, interesting to learn that the parentheses make no difference for SELECT DISTINCT.
I have one question, though. I've seen people show me queries where they write SELECT COUNT(DISTINCT...
July 26, 2010 at 8:22 am
Viewing 15 posts - 706 through 720 (of 1,187 total)