Viewing 15 posts - 781 through 795 (of 8,416 total)
Mark-101232 (2/8/2012)
Simpler?
Yes. It's answering a slightly different question, but it's definitely less code.
February 8, 2012 at 8:40 am
Samuel Vella (2/8/2012)
Are there any better work arounds?
More detail on the APPLY pattern:
http://sqlblog.com/blogs/rob_farley/archive/2011/04/12/the-power-of-t-sql-s-apply-operator.aspx
February 8, 2012 at 8:35 am
drew.allen (2/8/2012)
Peter Brinkhaus (2/7/2012)
As an alternative, you could use NOT EXISTS (SELECT [@Stag].* INTERSECT SELECT [@Prod].*) to compare rows.
Using EXCEPT should give you the same results, is probably more efficient,...
February 8, 2012 at 8:33 am
Mark-101232 (2/8/2012)
February 8, 2012 at 8:28 am
John Mitchell-245523 (2/8/2012)
February 8, 2012 at 8:02 am
He's referring to the possibility of non-deterministic updates:
DECLARE @T1 AS TABLE (col1 integer NULL, col2 integer NULL);
DECLARE @T2 AS TABLE (col1 integer NULL, col2 integer NULL);
INSERT @T1 VALUES (1, NULL);
INSERT...
February 8, 2012 at 7:40 am
monpara.sanjay (2/8/2012)
and This forum should want to define minimum version to use in question.
The site editor already gave his reasons for not specifying a minimum version. At least you...
February 8, 2012 at 4:14 am
cengland0 (2/8/2012)
Hugo Kornelis (2/8/2012)
You are aware that mainstream support for SQL Server 2005 has already ended, are you? I'd consider upgrading, if I were you... :hehe:
You're right that the ideal...
February 8, 2012 at 4:13 am
yubo1 (2/8/2012)
select * from temp2empdtlsexcept
select * from temp1empdtls
INSERT dbo.temp2empdtls
(empno, empname, age)
VALUES
(14, 'Bob', 46);
Your code gives the wrong results.
February 8, 2012 at 4:11 am
There are a couple of choices, use pessimistic locking or the optimistic rowversion:
February 8, 2012 at 3:35 am
AAYakovenko (2/8/2012)
When using function in order by clause, SQL loses rows.Why?
It's bug or special behavior?
This 'ordered variable concatenation' trick was only supported in a few specific cases for backward compatibility....
February 8, 2012 at 3:30 am
Stewart "Arturius" Campbell (2/8/2012)
Thanks, PaulThis one is going into my snippets as well....
Cool 😎 ...by the way there might be more efficient solutions, that's just the one that seemed natural...
February 8, 2012 at 3:24 am
monpara.sanjay (2/8/2012)
Thanks to clarifyI am using SQL Server 2005.
That was already clear 😛
Steve said it well a few posts back...
Steve Jones - SSC Editor (2/2/2012)
February 8, 2012 at 3:20 am
yubo1 (2/8/2012)
Is doesn't work use 'except'
You didn't try it did you? 😉
February 8, 2012 at 3:17 am
Viewing 15 posts - 781 through 795 (of 8,416 total)