Viewing 15 posts - 4,441 through 4,455 (of 8,731 total)
Am I late to the party? I was on a meeting.
Should I open the bottles of champagne? Who's in charge of the BBQ? :hehe:
August 11, 2015 at 7:08 am
Ed Wagner (8/11/2015)
djj (8/11/2015)
Eirikur Eiriksson (8/11/2015)
Ed Wagner (8/11/2015)
TomThomson (8/10/2015)
SQLRNNR (8/10/2015)
centrifugeacceleration
Velocity
Inertia
Energy
Force
Dark Side
August 11, 2015 at 7:02 am
More like inline views or single use views. You could also think of them as rearranged subqueries.
The engine will process all of this as a single statement, so you want...
August 10, 2015 at 2:21 pm
The easiest way is to understand what each CTE is doing. Just go step by step.
The first one is your original query. The second one is a list of clients....
August 10, 2015 at 2:12 pm
lcarrethers (8/10/2015)
So all that I want to see is the max one for each kms_quoteorder
How do you define the max one?
August 10, 2015 at 1:42 pm
I'm sorry, the ON clause shouldn't be there.
When you changed the code to include this:
FROM cteClients c
CROSS JOIN dbo.dimDate d where c.DATESERV = d.DateFull
You actually converted the CROSS JOIN...
August 10, 2015 at 1:27 pm
sgmunson (8/10/2015)
Luis Cazares (8/10/2015)
sgmunson (8/10/2015)
August 10, 2015 at 1:21 pm
I'm not sure how much can it be improved, but to give more advice you need to share more information as described in here: http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
August 10, 2015 at 12:50 pm
SQLRNNR (8/10/2015)
Brandie Tarvin (8/10/2015)
SQLRNNR (8/10/2015)
Alvin Ramard (8/10/2015)
Ed Wagner (8/10/2015)
Lynn Pettis (8/10/2015)
SQLRNNR (8/10/2015)
Take one down, pass it around, 48 bottles of...
August 10, 2015 at 12:37 pm
As this should only be done for reporting, I'd suggest you to use only the rows needed instead of reading the 60 million rows. No one will ever need that...
August 10, 2015 at 12:35 pm
Considering the following options. Which one is right?
CREATE TABLE #SampleData(
createdon datetime,
Kms_QuoteNumber varchar( 100))
INSERT INTO #SampleData
VALUES('2015-07-22 20:26:41.000', '15-35553/Rev9'),
...
August 10, 2015 at 12:32 pm
sgmunson (8/10/2015)
August 10, 2015 at 12:12 pm
What about using a different approach?
This might be what you're looking for.
SELECT TOP (1) kms_QuoteNumber
FROM quote
WHERE [kms_quotenumber] LIKE '15-35553%'
ORDER BY createdon DESC
August 10, 2015 at 12:08 pm
Something like this as they're table valued functions:
SELECT UserName,
Password,
u.String AS CleanUserName,
p.String AS CleanPassword
FROM Customerstrings
CROSS APPLY dbo.StripNonAllowedChars( UserName) u
CROSS...
August 10, 2015 at 10:56 am
You need to create a cartesian product that includes all dates for all the clients. The following code might need to be divided as it might cause problems to the...
August 10, 2015 at 10:47 am
Viewing 15 posts - 4,441 through 4,455 (of 8,731 total)