Viewing 15 posts - 5,146 through 5,160 (of 10,144 total)
I reckon this does it:
SELECT mx.Ticket_Closed_Date, mx.Interval, op.*
FROM ( -- create a matrix containing all intervals from Tijdsintervallen and all dates from Tussen_Tickets
SELECT *
FROM Tijdsintervallen
CROSS JOIN (
SELECT...
March 1, 2013 at 3:36 am
geert.de.vylder (2/28/2013)
I have been searching for a few days now to try to solve a problem, but without success. What I did find on the net wasn't what I...
February 28, 2013 at 8:09 am
Jeff Moden (2/27/2013)
GilaMonster (1/30/2013)
http://www.simple-talk.com/sql/performance/finding-the-causes-of-poor-performance-in-sql-server,-part-1/No magic bullets.
And no, adding the pk column to NC indexes is not going to fix lookups, and is probably a waste of time.
I've had some success...
February 28, 2013 at 2:40 am
surindersinghthakur (2/27/2013)
Can someone help me in optimizing below query, is there any other way where I can improve this query
SELECT A.Col1, COUNT(B.POST_DT) AS OD_NO
FROM (SELECT Col1, col3, Col2,
SUM(CASE...
February 28, 2013 at 1:45 am
winmansoft (2/27/2013)
You mean "select min([date]) from entries WHERE [date] BETWEEN '01-Jan-2012' and '20-Jan-2013'"? But we want to select minimum from top 100 rows
The minimum from the top 100 rows (as...
February 28, 2013 at 1:05 am
Morrison's are stocking a new Adnams ale, Ghost Ship. It's vaguely similar to the famous Thornbridge ales, Jaipur, Kipling and Wild Swan but a little sweeter. Lush even in our...
February 28, 2013 at 12:55 am
Raul Undreiner (2/27/2013)
Why would this work
SELECT *
FROM #MainQuery
WHERE column1 IN ('Value1','Value2')
and this not?
declare @var varchar(100)
set @TOB = '''Value1'',''Value2'''
SELECT *...
February 27, 2013 at 9:16 am
Jeff Moden (2/27/2013)
TheSQLGuru (2/27/2013)
February 27, 2013 at 6:56 am
The second query is a red herring. It will do this:
SELECT @Pist = dbo.udfOrGetDetail (@OID,@OTID) +'<br />'
as many times as rows returned by everything after the FROM list. Each time...
February 27, 2013 at 6:47 am
Paul White (2/27/2013)
ChrisM@Work (2/27/2013)
Anyway, isn't it past your bedtime?We can no longer be friends :laugh:
Slippers are in the post 😀
February 27, 2013 at 3:51 am
Paul White (2/27/2013)
ChrisM@Work (2/27/2013)
I know of at least one other old git who will be cackling his face off reading these posts :laugh:Oi!
Heh I didn't mean you specifically Paul, though...
February 27, 2013 at 3:34 am
mister.magoo (2/27/2013)
ChrisM@Work (2/27/2013)
...About once a week, mate. Now I'm an old git I can blame it on declining memory. When I was a sprightly youngster it was more embarrassing.
I know...
February 27, 2013 at 3:28 am
winmansoft (2/27/2013)
I don't think that is correct,because our query returns min(date) from top 100 rows which satisfies where condition But i don't find that in your query
Looks good to me...
--...
February 27, 2013 at 3:25 am
winmansoft (2/27/2013)
What if we don't want to sort the date? Is there any easy method?
Use Kingston's solution. It doesn't use the sort operator. It uses a stream aggregate.
February 27, 2013 at 3:24 am
dwain.c (2/26/2013)
ChrisM@Work (2/26/2013)
mister.magoo (2/26/2013)
ChrisM@Work (2/26/2013)
dwain.c (2/26/2013)
ChrisM@Work (2/26/2013)
peter-757102 (2/26/2013)
February 27, 2013 at 1:51 am
Viewing 15 posts - 5,146 through 5,160 (of 10,144 total)