Viewing 15 posts - 301 through 315 (of 825 total)
TomThomson (1/10/2015)
I think that having BEGIN TRANSACTION increment trancount by 2 instead of 1 is utterly silly. It's a really nasty trap that can cause pointless and damaging...
January 11, 2015 at 10:05 am
Another bad worded qotd:
My result.
Msg 515, Level 16, State 2, Line 7
Impossibile inserire il valore NULL nella colonna 'b' della tabella 'tempdb.dbo.#a__________________________________________________________________________________________________________________000000000211'. La colonna non ammette valori Null. INSERT avrà ...
January 8, 2015 at 1:08 am
Rune Bivrin (1/7/2015)
Not fond of this question.COUNT(*) counts NULL:s, but COUNT(<expression>) doesn't.
select count(*), count(a)from (values (1), (NULL)) x(a)
And GROUPING most certainly considers NULL:s.
+1
🙂
January 7, 2015 at 1:22 am
alter TABLE dbo.ActualOrders
with nocheck
add constraint o check(OrderDate between '20140101' and '20141231')
alter TABLE dbo.HistoryOrders
with nocheck
add constraint oo check(OrderDate between '20100101' and '20131231')
In this case the check is added, the optimizer...
January 6, 2015 at 2:52 am
Bob Cullen-434885 (1/6/2015)
January 6, 2015 at 2:47 am
patricklambin (12/30/2014)
Warning! The maximum key length is 900 bytes. The index 'PK__QoTD__2CB664DD844B62FA'...
December 30, 2014 at 2:50 am
Another solution is adding a xml column to the PlayList table and add the execution order there. So, it's just ONE update on ONE column.
December 22, 2014 at 3:53 am
natalie.ignatieva (12/21/2014)
December 22, 2014 at 3:50 am
It might be better to use JOINS, but that is a different question.
I disagree! JOINS are different than IN or EXISTS in the WHERE clause.
JOINS multiply the number of...
December 16, 2014 at 1:03 am
ROWCOUNT_BIG() differs from @@rowcount only from the type.
So, ROWCOUNT_BIG() is the correct answer. All other functions may be followed by the OVER clause.
November 20, 2014 at 1:27 am
One solution may be this one:
use tempdb
execute (
'
use AnotherDB
declare @a as a
insert @a values(1),(2),(3)
exec z @a
')
or using sp_executesql.
November 19, 2014 at 1:17 am
Viewing 15 posts - 301 through 315 (of 825 total)