Viewing 15 posts - 3,916 through 3,930 (of 7,610 total)
Or this:
SELECT FirstDate, SecondDate, ExpectedResult,
ABS(DATEDIFF(year, FirstDate, SecondDate)) as CurrentMethod,
CASE WHEN SecondDate >= FirstDate THEN
CASE WHEN (DATEPART(MONTH, SecondDate)...
March 9, 2017 at 10:35 am
As below. Or, if you need to show blanks rather than NULLs, then:
ISNULL(CAST(MAX(CASE WHEN TestType.id = 1 THEN Testing.score END) AS varchar(4)), '') AS Reading,
etc.
[code...
March 9, 2017 at 10:26 am
You don't need an identity column on this table: it just corrupts the table design and performance (and is a moderate waste of disk and RAM as well). There really...
March 9, 2017 at 8:34 am
March 8, 2017 at 2:57 pm
March 8, 2017 at 1:32 pm
If that happens to be a reserved word, so be it. I...
March 8, 2017 at 12:14 pm
I'll use the best column name for the particular data/business requirement. If that happens to be a reserved word, so be it. I don't go out of my way to...
March 8, 2017 at 10:57 am
Are you allowed to create a split function in the tempdb db? Ask them. It will make this much easier and more consistent to do. Of course you'll need code...
March 8, 2017 at 10:53 am
You need to define a "week", that is, what day do you consider to be the start of a week?
March 7, 2017 at 1:27 pm
Use the SQL start up proc to adjust the identity value back to a lesser-gap value. You can do a MAX($IDENTITY) to get the highest current value, add 1 (or...
March 7, 2017 at 10:01 am
Yeah, you should have no problems with applying a new svc pack.
March 6, 2017 at 3:08 pm
March 3, 2017 at 9:51 am
I don't believe we're saying you need to correct everything wrong with the table right now (I suspect that would be a truly big task). But this change seems pretty...
March 3, 2017 at 8:30 am
1) Yes, doing that does violate normalization, including 1NF. The text "discontinued effective 1/1/2011" has a date embedded in text. That alone is a clear violation of 1NF.
2) It's...
March 3, 2017 at 8:16 am
For best overall performance, first review index stats to make sure you have the best clustering index on every table. (Hint: The majority of time, this is not an identity...
March 2, 2017 at 11:34 am
Viewing 15 posts - 3,916 through 3,930 (of 7,610 total)