Viewing 15 posts - 4,321 through 4,335 (of 7,614 total)
You probably want to verify that the dates are actually backwards before swapping them:
update tableA
set StartDate = EndDate,
...
April 20, 2016 at 10:45 am
Can you give any example of where converting a literal value to appropriate non-unicode literal could ever cause SQL a performance issue?
Or for dates. Our rule is you convert...
April 18, 2016 at 12:57 pm
chuck.forbes (4/18/2016)
April 18, 2016 at 12:53 pm
TheSQLGuru (4/18/2016)
It's absolutely not coding "laziness". It's simply to allow for data type changes later without causing performance issues in the code.
Completely disagree with the first sentence. And even more...
April 18, 2016 at 12:49 pm
TheSQLGuru (4/18/2016)
ScottPletcher (4/18/2016)
TheSQLGuru (4/16/2016)
New rule: YOU WILL, ALWAYS WITHOUT EXCEPTION, USE EXACTLY THE SAME DATA TYPE AS THE COLUMN TO THE BEST OF YOUR LANGUAGES ABILITY TO DO SO!
THAT IS...
April 18, 2016 at 10:25 am
Yeah, definitely not 'sa' or some other existing/standard user.
Create a new user, native SQL user will do if that's available to you, and grant it just the specific permissions it...
April 18, 2016 at 10:14 am
TheSQLGuru (4/16/2016)
New rule: YOU WILL, ALWAYS WITHOUT EXCEPTION, USE EXACTLY THE SAME DATA TYPE AS THE COLUMN TO THE BEST OF YOUR LANGUAGES ABILITY TO DO SO!
THAT IS A HUGE...
April 18, 2016 at 8:48 am
TheSQLGuru (4/15/2016)
ScottPletcher (4/15/2016)
TheSQLGuru (4/15/2016)
ScottPletcher (4/15/2016)
Never use ISNULL in a WHERE or JOIN clause.
Whether the column is nullable or not is irrelevant.
The proper way to code this:
where isnull(SalesOrderID,-1)...
April 15, 2016 at 12:06 pm
dan-572483 (4/15/2016)
Excuse me? Are you saying that if a database is mirrored and disk-level corruption occurs the SQL will just pull the data from the mirror??
And I believe it...
April 15, 2016 at 11:34 am
TheSQLGuru (4/15/2016)
ScottPletcher (4/15/2016)
Never use ISNULL in a WHERE or JOIN clause.
Whether the column is nullable or not is irrelevant.
The proper way to code this:
where isnull(SalesOrderID,-1) = 43665...
April 15, 2016 at 11:15 am
The simplest rules is:
Never use ISNULL in a WHERE or JOIN clause.
Whether the column is nullable or not is irrelevant.
The proper way to code this:
where isnull(SalesOrderID,-1) = 43665 --NEVER!!
is this:
where...
April 15, 2016 at 10:40 am
Triggers should always be written for best efficiency first, even if it makes them harder to understand, especially so in your situation, with such heavy usage.
To keep each trigger as...
April 14, 2016 at 10:29 am
If you just want the static result of a function call to be inserted to the table, use INSERT INTO ... SELECT rather than INSET INTO ... VALUES:
INSERT INTO tblDashboard...
April 13, 2016 at 3:58 pm
No, I don't know what would have added those indexes. But I also don't see the relevance of that. Wouldn't normal index analysis -- of missing index stats,...
April 12, 2016 at 1:02 pm
I think it's a bad idea to assume the existing physical design is correct (unless you know that it was modeled very carefully logically first and then the physical design...
April 11, 2016 at 9:10 am
Viewing 15 posts - 4,321 through 4,335 (of 7,614 total)