Viewing 15 posts - 301 through 315 (of 627 total)
Welcome to the forums.
Check this link out on how to post these kinds of questions here. http://www.sqlservercentral.com/articles/Best+Practices/61537/
Since this is your first post I'll give you this first one as a...
May 19, 2016 at 7:38 am
Steve Jones - SSC Editor (5/18/2016)
May 19, 2016 at 7:03 am
drew.allen (5/18/2016)
yb751 (5/18/2016)
;WITH MyOriginalTable([TransactionID],[LineItemNumber],[Amount])
AS
(
SELECT 1,1,1.00 UNION ALL
SELECT 2,1,2.00 UNION ALL
SELECT 2,2,3.00 UNION ALL
SELECT 2,3,1.00 UNION ALL
SELECT 3,1,4.00 UNION ALL
SELECT...
May 18, 2016 at 6:00 pm
Ok, back from my meeting and thanks to Lowell's for the CTE.
;WITH MyOriginalTable([TransactionID],[LineItemNumber],[Amount])
AS
(
SELECT 1,1,1.00 UNION ALL
SELECT 2,1,2.00 UNION ALL
SELECT 2,2,3.00 UNION ALL
SELECT 2,3,1.00 UNION ALL
SELECT 3,1,4.00 UNION ALL
SELECT 3,2,3.00
)
SELECT
TransactionID,
LineItemNumber,
Amount,
SUM...
May 18, 2016 at 1:54 pm
This is easily done grouping your rows using a window function. Look up SUM OVER() and see. If you still need some help I'll post back with an...
May 18, 2016 at 1:41 pm
J Livingston SQL (5/18/2016)
Lynn Pettis (5/18/2016)
J Livingston SQL (5/18/2016)
Lynn Pettis (5/18/2016)
Grumpy DBA (5/18/2016)
jasona.work (5/18/2016)
Brandie Tarvin (5/18/2016)
May 18, 2016 at 12:53 pm
I'm more of an NFL guy so maybe it's hard to compare. I mean thanks to TO and his antics (sharpie, Dallas Star, etc...) the league had to institute...
May 18, 2016 at 12:49 pm
Ed Wagner (5/18/2016)
djj (5/18/2016)
jasona.work (5/18/2016)
Hugo Kornelis (5/18/2016)
djj (5/18/2016)
BWFC (5/18/2016)
Ray K (5/18/2016)
Ed Wagner (5/18/2016)
f-societyf-this
f-stop
f-sharp
Music
Bolero
10
Bo
Jackson
May 18, 2016 at 12:01 pm
Ed Wagner (5/17/2016)
Luis Cazares (5/17/2016)
ThomasRushton (5/17/2016)
crookj (5/17/2016)
Ray K (5/17/2016)
DonlSimpson (5/17/2016)
FillingPie
Banana (cream)
Split
Van Damme
Bloodsport
Action
May 17, 2016 at 11:43 am
Caz68 (5/12/2016)
I am using SQL server 2008 so assume that is MS SQL and not MYSQL as per my title apologies as I said...
May 12, 2016 at 1:34 pm
Luis Cazares (5/12/2016)
crookj (5/12/2016)
ThomasRushton (5/12/2016)
Ed Wagner (5/12/2016)
Grumpy DBA (5/12/2016)
whereisSQL? (5/11/2016)
Ed Wagner (5/11/2016)
HogwartsDementor
Azkaban
Sirius Black
Dog star
Lassie
Rin Tin Tin
German Shepherd
May 12, 2016 at 7:19 am
Bill Talada (5/11/2016)
Sure, the TOP clause accepts a parameter, just in case someone wants to make this a table valued function for returning 3, 12, or 300 dates. BTW, I...
May 11, 2016 at 2:40 pm
Lowell (5/11/2016)
Thanks for the script.couldn't resist.
lol...it was worth it!
May 11, 2016 at 12:54 pm
Or possibly a started on filter when clicking on Recent Posts would be nice...
May 11, 2016 at 12:24 pm
ZZartin (5/11/2016)
Hugo Kornelis (5/11/2016)
DonlSimpson (5/11/2016)
Ed Wagner (5/11/2016)
Hugo Kornelis (5/11/2016)
Grumpy DBA (5/11/2016)
djj (5/11/2016)
FriedBrain
Dead
Quick
Fox
Jumps
Double
Dragon
May 11, 2016 at 12:20 pm
Viewing 15 posts - 301 through 315 (of 627 total)