Viewing 15 posts - 16 through 30 (of 1,192 total)
Heh, nice, Scott. Further evidence my brain was not fully functioning this morning.
I had convinced myself that option didn't work, but for the life of me can't remember now what...
September 29, 2020 at 9:18 pm
The red underline from Intellisense is likely just from its cache not being refreshed; it often won't recognize newly created objects. If, as you suggest, the query completes without error,...
September 29, 2020 at 6:59 pm
What do you want to happen if there are accounts in TestTable with no matches in @tv_AccList? That scenario is not covered by your sample data.
Cheers!
September 29, 2020 at 6:54 pm
Or, if for fun we're trying to minimize characters used:
DECLARE @OriginalFirstStartDate DATETIME = GETDATE();
DECLARE @DaysDifference int = 200;
SELECT DATEADD(DAY,((@DaysDifference+7)/7)*7,@OriginalFirstStartDate) AS NewDate;
Cheers!
Edit: Actually that doesn't work (bonus points...
September 29, 2020 at 4:22 pm
Aside from Thom's good question about the logic, CASE WHEN .... AND CASE WHEN is a glaring syntax issue.
Multiple criteria in a CASE expression like yours would be implemented as...
September 29, 2020 at 3:11 pm
Glad to hear you have something that seems to work.
That posted solution is a good example of why I asked my question.
If you have some MSKUs for which there are...
September 14, 2020 at 2:39 pm
I understand what you're going for, but I need to confirm something about your data.
For each MSKU, will there never be more than one ItemID with a MemoText?
Cheers!
September 11, 2020 at 3:16 pm
No problem. I'm glad you got it sorted out.
Cheers!
May 26, 2020 at 4:54 pm
You don't believe your file is using 665.5 MB? Why not?
Why do you think you can't have 4.4 GB (4506 MB) free space?
To get GB, you would need to divide...
May 26, 2020 at 4:02 pm
85184 pages is 665.5 MB
85184*8 KB= 681472 KB
681472 KB / 1024 (KB in a MB) = 665.5 MB
The process of *8/1024 simplifies to /128, so I usually just divide pages...
May 26, 2020 at 3:15 pm
Brian's explanation is correct.
For documentation, see this link, which states:
TRY_CONVERT takes the value passed to it and tries to convert it to the specified data_type. If the cast succeeds, TRY_CONVERT returns the value...
May 22, 2020 at 10:03 pm
For some official word on this if you would like a reference, check this link, which includes the following:
New Transact-SQL syntax is not gated by database compatibility level, except...
May 22, 2020 at 4:47 pm
The decision on whether to reindex definitely does NOT have to be made based on logical fragmentation percent.
That is most common, but as I said in the previous post, for...
March 26, 2020 at 9:19 pm
That particular result actually isn't, as far as I understand it, because ydm is not supported for the date datatype
For example:
SET LANGUAGE Deutsch;
SELECT cast_as_datetime=CAST('2020-12-25' AS DATETIME);
SELECT...
March 26, 2020 at 9:12 pm
On integrity checks, yes, the longer you go between checks, the more potential data loss you're exposed to in a worst-case scenario.
For that reason, the more frequently you can get...
March 26, 2020 at 8:27 pm
Viewing 15 posts - 16 through 30 (of 1,192 total)