Viewing 12 posts - 1 through 12 (of 12 total)
You learn something new every day...The multiple rows on an Insert Into/Values fails on older versions of SQL, but has been added to SQL 2008+
June 17, 2014 at 7:17 am
Actually I did make a version that replaced the call to up_CalculateEmailPoints_Insert, it was more a real life example of RBAR and how someone did what they could to avoid...
February 3, 2009 at 12:11 pm
Lynn,
I think in many ways it is a blessing, but I do not like the timing. Seems like everyone out there sees this as a time to get senior experiance...
February 3, 2009 at 10:42 am
Lynn Pettis (2/3/2009)
LeeBear35 (2/3/2009)
DECLARE @Count...
February 3, 2009 at 10:14 am
Not that I want to complain, but does anyone see a problem with a company that would retain a person that consistenly produces code like this:
DECLARE @Count INT
SELECT @Count=MIN(EID) FROM...
February 3, 2009 at 9:59 am
I have encountered problems with Merry Go Round issues too. On small samples it would always work but as data sets grew it was more and more of an issue...
January 30, 2009 at 6:42 am
TheSQLGuru (1/22/2009)
You have a billion row table, with from 0 to 100 rows at any one time...
January 22, 2009 at 4:01 pm
GSquared (1/22/2009)
Joe Celko (1/22/2009)
January 22, 2009 at 2:23 pm
It is a shame that anyone would cut such corners in project planning and development. Yes you may need to get the software out the door, but I watched as...
January 20, 2009 at 2:25 pm
As like the solution using the Anchor value, I have not seen that "fix" before. I also wondered if the clustered index was generated with a fillfactor=100 is the anchor...
January 16, 2009 at 11:42 am
Although I would stay away from cursors on a couple million row table this would be the best I can come up with.
Here is a 3x solution (one pass to...
January 16, 2009 at 9:50 am
Your original query is:
USE NorthWind
SELECT
[x].[OrderID],
[x].[Freight],
(
SELECT
SUM([y].[Freight])
FROM [dbo].[Orders] [y]
WHERE [y].[OrderID] <= [x].[OrderID]
) AS [RunningTotal],
(
SELECT
COUNT([y].[Freight])
FROM [dbo].[Orders] [y]
WHERE [y].[OrderID] <= [x].[OrderID]
) AS [RunningCount]
FROM [dbo].[Orders] [X]
ORDER BY
[x].[OrderID]
This would...
January 16, 2009 at 7:29 am
Viewing 12 posts - 1 through 12 (of 12 total)