Viewing 15 posts - 6,751 through 6,765 (of 8,753 total)
Quick runnable demonstration on the flexibility of FOR XML PATH
😎
USE tempdb;
GO
SET NOCOUNT ON;
;WITH BASE_DATA(BD_ID,BD_VAL) AS
(SELECT * FROM (VALUES
(1,'ABC')
...
October 18, 2014 at 4:19 am
Quick thought, in command prompt run "net start", the sql server instance will show up in the output if running, if not, start the instance.
😎
October 18, 2014 at 3:42 am
clayman (10/17/2014)
The reason why I split the string is that I want to order the Ids, eg.
DECLARE @INPUT_STR VARCHAR(50) = '101,102,103,108';will be the same as
DECLARE @INPUT_STR VARCHAR(50) = '103,102,101,108';
I...
October 18, 2014 at 3:11 am
Quick suggestion, create a view with compliant names, i.e. replace spaces with underscores, then specify the proper field name in the report. There is a three year old Connect entry...
October 18, 2014 at 1:38 am
jonen (10/3/2014)
October 18, 2014 at 1:27 am
Quick suggestion, try two separate queries, one for each email table and combine the results using union all.
😎
October 17, 2014 at 2:17 pm
clayman (10/17/2014)
Excellent, thank you.
You are very welcome. Out of curiosity, what do you use for splitting the incoming parameters?
😎
October 17, 2014 at 1:42 pm
Quick suggestions since Id's can be shared by Categories
😎
USE tempdb;
GO
DECLARE @t TABLE (Id INT)
INSERT INTO @t
SELECT 108 UNION ALL
SELECT 102 UNION ALL
SELECT 103 UNION ALL
SELECT 101;
DECLARE @t2 TABLE (CategoryId INT,...
October 17, 2014 at 11:56 am
...and another solution using the pre-split-string table
😎
USE tempdb;
GO
DECLARE @t TABLE (Id INT)
INSERT INTO @t
SELECT 101 UNION ALL
SELECT 102 UNION ALL
SELECT 103 UNION ALL
SELECT 108;
DECLARE @t2 TABLE (CategoryId INT, Id INT)
INSERT...
October 17, 2014 at 12:22 am
Quick solution for SQL Server 2012 and later, replaces also the split into @t
😎
USE tempdb;
GO
DECLARE @t2 TABLE (CategoryId INT, Id INT)
INSERT INTO @t2
SELECT 2, 50 UNION ALL
SELECT 2, 51 UNION...
October 16, 2014 at 10:11 pm
Quick thought, remove the FOR XML from the nested query.
😎
October 16, 2014 at 9:58 pm
First suggestion is to add one step where the files are directly loaded into a staging table as an XML blob, without any shredding or processing. This will give you...
October 16, 2014 at 12:18 pm
You are absolutely right Gianluca, the source of the problem has to be determined before applying any fixes. What I left out in the previous post was of course using...
October 16, 2014 at 8:56 am
davidwarner (10/16/2014)
BTW i read i shouldn't make any changed to maxdop or cost of parra during business hours as SQL will dump the plan cache?
That is correct, so be careful!
It...
October 16, 2014 at 1:04 am
Quick thought, the cost threshold for parallelism is way too low, would suggest setting it to 50 for a start. Can you provide more information on the setup?
😎
October 15, 2014 at 11:34 pm
Viewing 15 posts - 6,751 through 6,765 (of 8,753 total)