Viewing 15 posts - 1,831 through 1,845 (of 6,036 total)
ScottPletcher (11/17/2015)
November 17, 2015 at 6:58 pm
"Single row" is not a good representation of a partnership/relation.
First, as you realised, it's not symmetrical, partners are not equal in it by design.
Second, it does not allow more then...
November 16, 2015 at 7:26 pm
ScottPletcher (11/16/2015)
But there is still no reason whatsoever to cluster this table by identity.
Actually, there is.
And I pointed on it in my previous post:
to preserve random...
November 16, 2015 at 5:34 pm
ScottPletcher (11/16/2015)
[Yes, (maybe) that gives you less fragmentation on the base table, but that's irrelevant if you (almost) never look up by the id anyway!!
I'd say it this way:
But...
November 16, 2015 at 4:58 pm
Those are double-byte characters. They have corresponding HEX values, but not single byte ones.
SELECT CONVERT(VARBINARY, N'?')
You can search for them, but you must specify them as UNICODE:
WHERE [Column] like N'%?%'
November 16, 2015 at 2:46 pm
ScottPletcher (11/16/2015)
but still cluster the table on the RedemptionCode.
Clustering a column with randomly generating values is not the best approach ever.
It's as bad as setting a GUID as clustered...
November 16, 2015 at 2:38 pm
You are using different data types for RedemptionCode and @RedemptionCode.
When you check for existence you compare values of different data types, which forces implicit conversion.
When an operator combines two expressions...
November 15, 2015 at 5:57 pm
David Rich (11/9/2015)
Type conversion in expression (CONVERT_IMPLICIT(varchar(255),[e].[abc],0)) may affect "CardinalityEstimate" in query plan choice
and this is getting converted to nvarchar(255). Will...
November 10, 2015 at 1:35 pm
Both options suck.
WHERE (NOT) EXISTS
does the job way more effectively.
And NULL handling is much more clear in this case.
November 9, 2015 at 5:34 pm
Here is some old school solution.
Should make the logic crystal clear.
And it's set based, works on a table, so may be easily made into a view.
DECLARE @Table TABLE (
Col varchar(500)
)
DECLARE...
November 5, 2015 at 4:38 pm
I would suggest (if NOLOCK is a requirement) to use NOLOCK, not WITH (NOLOCK).
NOLOCK without brackets is not a hint, but a table name alias.
So, the query would be using...
November 4, 2015 at 8:33 pm
Kristen-173977 (11/4/2015)
select TOP 1 Col1, Col2, ...
FROM @tempdat
where repdate < @StartDate
ORDER BY repdate DESC,...
November 4, 2015 at 8:10 pm
GilaMonster (11/1/2015)
Sergiy (11/1/2015)
Gail, I'm talking from experience.Three times this year I've had to assist with the restore of a production backup to recover deleted data (2 cases)
Oh, I see your...
November 2, 2015 at 1:37 pm
Viewing 15 posts - 1,831 through 1,845 (of 6,036 total)