Viewing 15 posts - 196 through 210 (of 627 total)
Smendle (9/22/2016)
How to initialise a sql variable to 0 in stored-procedure which would work both in SQLServer 2005 & 2008 ?
The part I bolded above provides a default value...
September 22, 2016 at 11:27 am
Depending on what version of SQL you are using you can use the 'oneresultset = 1' parameter.
That being said I do believe that is a fairly recent change. You...
September 22, 2016 at 11:09 am
ChrisM@Work (9/6/2016)
Sean Lange (9/6/2016)
Luis Cazares (9/6/2016)
Sean Lange (9/6/2016)
September 6, 2016 at 9:54 am
whereisSQL? (9/6/2016)
Hugo Kornelis (9/6/2016)
Ray K (9/6/2016)
Ed Wagner (9/6/2016)
djj (9/6/2016)
Ed Wagner (9/6/2016)
Hugo Kornelis (9/6/2016)
Stuart Davies (9/6/2016)
BWFC (9/6/2016)
TomThomson (9/6/2016)
Revenant (9/5/2016)
TreatTrick
Cheap
Canary
Wharf
Worf
Data
Riker
Island
Beach
Volleyball
Top Gun
September 6, 2016 at 9:47 am
Looks like you are having a problem with the "Similar_Call" column but I'm not sure exactly what you are trying to accomplish...or at least your logic.
I've broken part of the...
August 30, 2016 at 7:59 am
WayneS (8/29/2016)
jasona.work (8/29/2016)
Brandie Tarvin (8/29/2016)
August 29, 2016 at 11:37 am
ZZartin (8/25/2016)
Ray K (8/25/2016)
crookj (8/25/2016)
Ed Wagner (8/25/2016)
Alan.B (8/25/2016)
BWFC (8/25/2016)
Prefectday
Night
Stalker
Talker
Dead
Walking
August 25, 2016 at 12:27 pm
This seems too easy so maybe I don't understand but if you merely want to convert seconds to hours you can just do something like this.
DECLARE @seconds INT = 29732
SELECT...
August 25, 2016 at 12:01 pm
Grumpy DBA (8/23/2016)
Ed Wagner (8/23/2016)
Kaye Cahs (8/23/2016)
Revenant (8/22/2016)
whereisSQL? (8/22/2016)
AntacidTums
Chalk
Blackboard
Blackbeard
Pirate
August 23, 2016 at 7:19 am
DuncEduardo (8/23/2016)
yes, if you don't mind. I'm doing a few other things and had to put this aside.
If you can post some DDL and Sample Data that would be very...
August 23, 2016 at 7:18 am
Kaye Cahs (8/16/2016)
djj (8/16/2016)
Ed Wagner (8/16/2016)
whereisSQL? (8/16/2016)
The Dixie Flatline (8/16/2016)
ThomasRushton (8/16/2016)
whereisSQL? (8/16/2016)
Grumpy DBA (8/16/2016)
djj (8/16/2016)
RocketRichard
Canada
Dry
Martini
Cherry
Peach
Apple
Tart
Pop
August 16, 2016 at 11:21 am
Manic Star (8/15/2016)
HappyGeek (8/15/2016)
Luis Cazares (8/15/2016)
whereisSQL? (8/15/2016)
Revenant (8/15/2016)
Ray K (8/15/2016)
Ed Wagner (8/15/2016)
djj (8/15/2016)
Grumpy DBA (8/15/2016)
djj (8/15/2016)
Ed Wagner (8/15/2016)
SweetTreat
Trick
Joke
Puzzle
Jigsaw
Tools
Power
Unlimited
Opportunities
Scam
Spam
August 15, 2016 at 12:21 pm
Y.B. (8/11/2016)
SELECT o.[Date], o.OrderID, x.ProdID, o.QTY, x.Category
FROM #Crosstab c
UNPIVOT (
Category FOR [Date] IN ([01/08], [02/08], [03/08], [04/08])
)...
August 15, 2016 at 7:31 am
This gave me the results you were looking for.
SELECT item, RType, FMonth, FYear, Qty,
SUM(QTy) OVER (PARTITION BY item ORDER BY FYear, FMonth) AS TotalQty
FROM TestData
WHERE RType = '2.Supply'
UNION...
August 11, 2016 at 2:12 pm
It's not a dynamic solution but something like this gets the output you want.
SELECT o.[Date], o.OrderID, x.ProdID, o.QTY, x.Category
FROM #Crosstab c
UNPIVOT (
Category FOR [Date] IN ([01/08], [02/08], [03/08], [04/08])
) x
JOIN...
August 11, 2016 at 12:07 pm
Viewing 15 posts - 196 through 210 (of 627 total)