Viewing 15 posts - 4,306 through 4,320 (of 7,597 total)
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
Or, since we're dealing with JOINs:
What is the difference between INNER JOIN and LEFT OUTER JOIN?
What is the difference between LEFT OUTER JOIN and RIGHT OUTER JOIN?
What is a FULL...
April 8, 2016 at 3:33 pm
Yep, exactly. It sounds like some type of certification q too, where because MS mentions "restricted" in BOL or some other help, you're supposed to remember it exactly and...
April 8, 2016 at 2:37 pm
Viewing 15 posts - 4,306 through 4,320 (of 7,597 total)