Viewing 15 posts - 3,286 through 3,300 (of 10,144 total)
WITH Cases AS (
SELECT * FROM (VALUES
('SystemA', 'Case1', '2013-07-11 13:17:09.000', '2013-07-15 12:05:03.000'),
('SystemA', 'Case2', '2013-07-12 16:27:50.000', '2013-07-12 16:29:12.000'),
('SystemA', 'Case3', '2013-07-12 17:30:32.000', '2013-07-12 17:40:11.000'),
('SystemA', 'Case4', '2013-07-12 19:00:24.000', '2013-07-12 19:04:14.000'),
('SystemA', 'Case5', '2013-10-01...
June 9, 2014 at 5:41 am
T.Ashish (6/9/2014)
Yes, I had already tried creating # table as you advised. This was showing lot of improvement in i/o stats as main part was executing only 1 time...
June 9, 2014 at 5:32 am
T.Ashish (6/9/2014)
I have attached a script and its execution plan for your review.
We are working for a long time on optimizing this script, and latest modification I did was...
June 9, 2014 at 3:22 am
SQL is delicious (6/6/2014)
Koen Verbeeck (6/6/2014)
gbritton1 (6/6/2014)
Koen Verbeeck (6/6/2014)
TomThomson (6/6/2014)
Just a couple of examples: A British colleague who held an A-level in math and a bachelor's in business swore...
June 6, 2014 at 9:49 am
julian.fletcher (6/6/2014)
June 6, 2014 at 9:17 am
julian.fletcher (6/5/2014)
June 6, 2014 at 8:56 am
Koen Verbeeck (6/5/2014)
I prefer the alias with the equal sign. It is very easy to align everything, especially when you have larger expressions.
It's hard to believe this I know, but...
June 6, 2014 at 6:24 am
pk2dpvp (6/6/2014)
(408014 row(s) affected)
which with where is:
(2054 row(s) affected)
---------------------------------------------
Isn't this because it doesn't know what to do with AND so it...
June 6, 2014 at 6:09 am
The first query may not be doing what you expect. If you reference a column from a left-joined table in the WHERE clause, the left join is converted to an...
June 6, 2014 at 5:26 am
-- TESTING
-- Set up a CTE with agent numbers expanded out, randomly number the rows within each QueueID
;WITH RandomAgents AS (
SELECT QueueID, AgentID, rn = ROW_NUMBER() OVER(PARTITION BY...
June 5, 2014 at 8:53 am
vinodkumark_mca (6/5/2014)
Thanks for your feedback.
I have attached the related tables and functions in "Queries.txt" file.
The testing data is shared in "TestingData.xls" file.
Please look into issue and let me know if...
June 5, 2014 at 6:39 am
Hrhb.mail (6/5/2014)
Where are you adding your conditions? Can you post the code that gives you an error?
Thanks, I solved it.
This is my final stored procedure:
Create PROCEDURE [dbo].[NewsPageWise]
...
June 5, 2014 at 6:16 am
Jeff Moden (6/3/2014)
Eirikur Eiriksson (6/3/2014)
Jeff Moden (6/2/2014)
Unless this was an accidental duplication of data, there's no way that I'd do this. You're destroying historical data.
Second that but then again...
June 3, 2014 at 8:27 am
ramana3327 (6/1/2014)
Actually I am getting some syntax error while executing that, so in the mean while I posted here to find any alternative.
ramana3327 (5/31/2014)
IF NOT...
June 2, 2014 at 6:48 am
ScottPletcher (5/30/2014)
I think the overhead of XML is unwarranted here...
Yes you're right, with a fixed number of rows, FOR XML PATH is probably overkill.
June 2, 2014 at 2:02 am
Viewing 15 posts - 3,286 through 3,300 (of 10,144 total)