Viewing 15 posts - 1,471 through 1,485 (of 3,348 total)
PHYData DBA (8/18/2014)
Why waste time, money,...
August 18, 2014 at 11:11 am
Raghavendra Mudugal (8/18/2014)
say we use nolock and it reads dirty and executes the select statement faster, now how to achieve the same speed without using nolock?
That's the wrong question to...
August 18, 2014 at 10:55 am
It's been like that for a long time already. In some places, the QotD author is presented with the correct author. In other places, it is presented with the author...
August 12, 2014 at 2:07 pm
Thanks, all, for the nice words! 😉
Sektor / Iulian: Yes, this is indeed different from C#, which (as far as I know - probably not very far) uses multiple-pass compilation....
August 11, 2014 at 12:42 pm
TomThomson (8/6/2014)
Hugo Kornelis (8/5/2014)
I see that Tom already posted an explanation. I think he is correct, but I will phrase it simpler - my explanation is that a variable is...
August 6, 2014 at 2:31 pm
And to conclude my rapidfire of messages - thanks all for the kind messages.
This question was indeed easier than some of my others. My goal with this question (and the...
August 5, 2014 at 3:40 pm
Carlo Romagnano (8/5/2014)
-- this runs
DECLARE @i int = 1, @j-2 int = 2;
SET @i += 2;
SELECT @j-2 * @i
GO
-- this raises error
DECLARE @i int = 1, @j-2 int...
August 5, 2014 at 3:37 pm
TomThomson (8/5/2014)
edit: I'm amazed how many people fell for one of the two "only simple values, no expressions" options; and that only 44% got it right.
I am not surprised by...
August 5, 2014 at 3:34 pm
Raghavendra Mudugal (8/5/2014)
August 5, 2014 at 3:31 pm
Koen Verbeeck (8/5/2014)
Nice question Hugo.Your explanation left out "compound assignment operator" however 🙂
http://technet.microsoft.com/en-us/library/ms189484(v=sql.100).aspx
Thans for the addition, Koen!
I only realise now (after reading your message and another on the same topic)...
August 5, 2014 at 3:29 pm
patrickmcginnis59 10839 (7/30/2014)
Some interpreters start executing immediately, I'm hazarding a guess that SQL Server doesn't!
Correct. SQL Server will parse and compile the entire batch (and the compiling part includes generating...
July 30, 2014 at 7:04 am
Brian.Klinect (7/30/2014)
If you're allowed to re-declare @j-2 inside the while loop, why are you allowed to select from @j-2 outside of the while loop?
See my post above (which I started...
July 30, 2014 at 6:31 am
Mighty (7/30/2014)
Stewart "Arturius" Campbell (7/30/2014)
All variables are declared at compile time. at this time, all control flow commands are ignored.
That is more or less what I was thinking, but in...
July 30, 2014 at 6:28 am
Roland C (7/27/2014)
I executed the script in SSMS (SQL Server 2012). It returned "10 row(s) affected", the csv file was created, but was...
July 28, 2014 at 7:38 am
I realized that #Employee would not be available in the context of the bcp command, but had to do some digging to predict whether that would result in an empty...
July 28, 2014 at 7:36 am
Viewing 15 posts - 1,471 through 1,485 (of 3,348 total)