Viewing 15 posts - 31 through 45 (of 1,957 total)
At first glance you are missing an alias for the derived table - just add an alias after the last bracket
September 22, 2016 at 4:08 pm
😀
I prefer to do what needs to be done then get on with writing positive code - cleanup code is for DBAs 😀
September 22, 2016 at 11:03 am
I would:
Change the process so it doesn't generate empty tables.
Then filter the table list where name contains "MyTable_".
Open Object Explorer Details, right click column headers and include "Row Count" in...
September 22, 2016 at 8:48 am
I guess one solution would be to raise the error again with a user error level, but include the original error level in the message?
By the way, unrelated, but...
September 21, 2016 at 4:15 pm
drew.allen (9/20/2016)
mister.magoo (9/20/2016)
I guess we should handle NULLs as requested...Actually, the FOR XML PATH already handles NULLs, so you don't need to make any changes to your original code.
Drew
Thanks, I'd...
September 20, 2016 at 8:21 am
I meant to mention that the sample data provided has nothing we can ORDER by to ensure the concatenation happens as expected.
You should include something for that and add ORDER...
September 20, 2016 at 5:55 am
I guess we should handle NULLs as requested...
SET STATISTICS TIME,IO ON;
WITH ALL_A(A) AS (SELECT DISTINCT A FROM #T)
SELECT T.A
...
September 20, 2016 at 12:46 am
It's a horrible three scan plan...but I can't think of another way right now...
WITH ALL_A(A) AS(SELECT DISTINCT A FROM #T)
SELECT T.A, CONCATSTRINGB, CONCATSTRINGC
FROM ALL_A AS T
CROSS APPLY (
SELECT...
September 19, 2016 at 4:49 pm
This sounds a lot like an Anti-Virus problem.
It's unlikely that two processes would use the same temp file name - and especially to keep doing it.
I suppose it's also possible...
September 16, 2016 at 5:13 pm
If I were you, I would log this on Connect and Trello as a bug - I just tried it with a simple report that runs three selects that are...
September 8, 2016 at 4:19 am
crmitchell (9/8/2016)
Where those standards are not applied division by zero is an error in all (AFAIK) programming languages so I see no good reason for SQL behaving differently.
Well, if you...
September 8, 2016 at 4:00 am
Ah well, it was worth a bash...
I guess it is running the first query once for the parameter, then again for the report and that messes with your timing.
September 8, 2016 at 3:44 am
Depending on your exact report, this may work - it works in principle, but performance might be an issue...
Create a hidden parameter that takes it's default value from Dataset1
Modify the...
September 8, 2016 at 2:52 am
Sergiy (9/7/2016)
mister.magoo (9/7/2016)
CASE...
September 8, 2016 at 2:26 am
I would agree that in a lot of my t-sql code, I return a null for division by zero.
This is not, however, because division by zero equals NULL.
It doesn't.
I...
September 7, 2016 at 6:21 pm
Viewing 15 posts - 31 through 45 (of 1,957 total)