Viewing 15 posts - 2,836 through 2,850 (of 7,187 total)
OK, so you want to concatenate all the preceding ReportingGroups into one column. I've got to ask - how many rows do you or will you have? If...
January 18, 2016 at 5:52 am
Yes, if you have multiple matches in the second table then you'll get one row for each in your result set. Now, what results are you expecting to see?
John
January 18, 2016 at 3:24 am
If there are only three columns, you might want to take a look at today's headline article[/url]. Of course, if this is something you're going to do regularly on...
January 15, 2016 at 8:51 am
Does Luis's solution get you anywhere close? If not, you might try including database name (or id) and date (with time portion, if any, stripped out) in your join...
January 15, 2016 at 8:01 am
So you have a table of DBCC check results and a table of backup results, and you want to join them? I'm not sure why you'd want to do...
January 15, 2016 at 7:11 am
Yes, and furthermore, a table variable only lives for the duration of the batch in which it is created, so you may find it difficult, if not impossible, to use...
January 15, 2016 at 6:39 am
Run that second subquery on its own, and you'll see it returns a different result for each of the two guises. That's why the whole thing returns a different...
January 15, 2016 at 6:33 am
Sounds like an extension of the UPDATE...FROM issue, where you can get unreported cardinality errors. If you update TableA based on a join to TableB, and there are multiple...
January 15, 2016 at 2:50 am
Is it the exact same message (unpersonalised) that you want to send to each recipient. You can send the same message to multiple recipients, so why not build the...
January 15, 2016 at 1:23 am
I've had this problem before. If I remember correctly, I solved it by creating stored procedures - one for each action (sp_start_job etc) and assigning the user permission to...
January 15, 2016 at 1:17 am
Ian
What happens if you CAST after doing the SUM?
John
January 14, 2016 at 2:16 am
Yes - every time you use dm_db_index_physical_stats, SQL Server has to go away and examine the indexes to find out their fragmentation level. Even though you've filtered on those...
January 13, 2016 at 8:45 am
No, do you have plenty of space on the disk(s) on which the msdb data and log files are located?
John
January 11, 2016 at 9:55 am
In that case, it's even simpler.
SELECT
id
,product
,MIN(start_date) AS StartDate
,NULL AS EndDate
FROM @t
GROUP BY
id
,product
HAVING COUNT(*) > COUNT(end_date)
But what happened to the DATEDIFF requirement?
John
January 11, 2016 at 9:43 am
That any integer is just a placeholder. As you've already noticed, you'll get the same result whatever argument you put in there. What you do have to be...
January 11, 2016 at 8:06 am
Viewing 15 posts - 2,836 through 2,850 (of 7,187 total)