Viewing 15 posts - 3,376 through 3,390 (of 10,144 total)
I was tempted to suggest that only IBG and Jeff's queries can run that fast. Also, that queries running that fast can overheat the processor and should be slowed...
May 7, 2014 at 4:06 am
Bouke Bruinsma (5/6/2014)
ChrisM@home (5/6/2014)
Try this.
;WITH Updater AS (
SELECT
FTEHrsAVG,
NewFTEHrsAVG = AVG(CASE WHEN FlexVast = 'VAST' THEN FTEHrs ELSE NULL END)
...
May 7, 2014 at 2:21 am
Begin by eliminating the obvious differences - your parameters are different datatypes between the two environments. The datatype of your parameters should match the datatype of the table columns wherever...
May 7, 2014 at 2:16 am
WHILE affects only the statement immediately afterwards. If this statement is a batch defined by BEGIN and END, then the statements in the batch will be processed until the WHILE...
May 7, 2014 at 2:06 am
Jeff Moden (5/6/2014)
Sean Lange (5/1/2014)
The first and the biggest issue is this is wide open to sql injection.
In most cases, I'd strongly agree with you but... with two DATE, one...
May 7, 2014 at 1:57 am
Variation on David's;
DROP TABLE #Sample;
CREATE TABLE #Sample (a INT, b INT, c INT);
INSERT INTO #Sample (a, b, c)
SELECT * FROM (VALUES (12345, 10000, 1),
(12345, 10000, 2),
(12345, 10000, 3),
(12345, 10001, 1),
(12346,...
May 7, 2014 at 1:45 am
Sean Lange (5/6/2014)
ChrisM@Work (5/6/2014)
DROP table #Sample
Create table #Sample...
May 6, 2014 at 9:32 am
PIVOT / UNPIVOT haven't been told about the output column limitation of SELECT. Here's how to get 10,001 output columns from a SELECT:
DROP table #Sample
Create table #Sample (Empid int primary...
May 6, 2014 at 9:08 am
ChrisM@Work (5/6/2014)
KGJ-Dev (5/6/2014)
thank you and am aware of this limitation. Is it possible to give me the dynamic query? i am planing to retrieve first 10000 rows for testing.
10,000...
May 6, 2014 at 8:13 am
KGJ-Dev (5/6/2014)
thank you and am aware of this limitation. Is it possible to give me the dynamic query? i am planing to retrieve first 10000 rows for testing.
10,000 rows...
May 6, 2014 at 6:42 am
It won't need a genius, only a decent explanation. Perhaps a model would help. Try tinkering with this for starters:
SELECT [identifying field], A, B, C,
MAX(B) OVER(PARTITION BY [identifying field]),
CASE WHEN...
May 6, 2014 at 5:18 am
saifmahatab (5/5/2014)
Thanks but its not working..I tried I need to create a temp table where it stores the timing of a select query that I have takes time to run
Sean's...
May 6, 2014 at 2:57 am
psingla (5/6/2014)
In following code query 2 takes 1 sec to execute and query 1 keeps on running for hours.
I tried...
May 6, 2014 at 2:31 am
yuvipoy (5/5/2014)
yuvipoy (4/22/2014)
So my question is index seek is better than index scan
previously my query...
May 6, 2014 at 2:27 am
You have three options: dynamic sql, a catch-all query, or using IF blocks to test the parameters and run whichever query fits the parameters.
Catch-all queries are popular but come...
May 6, 2014 at 2:04 am
Viewing 15 posts - 3,376 through 3,390 (of 10,144 total)