Viewing 15 posts - 7,051 through 7,065 (of 7,597 total)
I use this q as extra credit for my students when I teach a SQL class.
It came up in real life.
This is not for an initial...
November 29, 2012 at 3:46 pm
No. SQL does not normally track that a row has changed.
SQL will add columns that might be used to determine that when you specify certain things for a...
November 29, 2012 at 3:39 pm
When you create the nonclustered index on c2, explicitly specify c1 as a key after that.
Then define the FK on (c2, c1) and you should be covered.
November 29, 2012 at 3:34 pm
You've got potential for serious issues on tempdb and log files especially::
Tempdb should never be RAID6 because of its high write activity. Btw, same for log drives, for the...
November 29, 2012 at 3:29 pm
I'd wait to check numeric columns, because it's gonna be even more difficult to determine if the values are SSNs.
As to [n][var]char, you do have some restrictions that help:
1) column...
November 29, 2012 at 3:04 pm
capnhector (11/26/2012)
ScottPletcher (11/26/2012)
Also, with a reasonably well-tuned tempdb, you should strongly consider using the:
SORT_IN_TEMPDB =...
November 27, 2012 at 8:52 am
Is the backup in a "safe" location, such as a SAN drive, that can survive if the server itself fails?
If not, you need to copy the backup to an alternate...
November 26, 2012 at 4:19 pm
haagendaz (11/26/2012)
November 26, 2012 at 4:12 pm
Of course don't rebuild needlessly; check the stats and only rebuild those indexes that require it.
Also, with a reasonably well-tuned tempdb, you should strongly consider using the:
SORT_IN_TEMPDB = ON
option. ...
November 26, 2012 at 3:57 pm
pdanes (11/26/2012)
DiverKas (11/26/2012)
But wouldn't this always compare all variables, though? In the syntax with OR, the query engine can see that a variable is empty, thereby satisfying one side of...
November 26, 2012 at 3:51 pm
You want to use a T-SQL script to do the backup and restore, not go thru the GUI. That will speed up and simplify future repeats of the same...
November 26, 2012 at 3:15 pm
Yes, my initial concern wasn't with performance per se but with readability/understandability.
Since PARSENAME is available, fully tested and documented already, I would use it in preference to hand-coded SUBSTRING,...
November 26, 2012 at 1:18 pm
Eugene Elutin (11/20/2012)
After a bit of testing, I can confirm that PARSENAME does win much more often over use of CHARINDEX with SUBSTRING's than other way around.
(Will keep this...
November 20, 2012 at 12:17 pm
Eugene Elutin (11/20/2012)
ScottPletcher (11/20/2012)
select PARSENAME(left(email, charindex('@', email) - 1), 1) + '.' + PARSENAME(left(email, charindex('@', email) - 1), 2) +
substring(email, charindex('@', email), len(email))
from (
...
November 20, 2012 at 9:55 am
Viewing 15 posts - 7,051 through 7,065 (of 7,597 total)