Viewing 15 posts - 196 through 210 (of 4,080 total)
So, does anyone want to run a test where all 50 states are accounted for?
I agree that this has been one of those forums that has been thought-provoking in terms...
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
September 15, 2016 at 10:12 am
J Livingston SQL (9/14/2016)
http://www.sqlservercentral.com/Forums/FindPost1817587.aspx 😀
And please don't post in multiple forums. And most especially don't post in forums of a higher level than your production level....
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
September 15, 2016 at 10:09 am
Some questions, since you submitted no sample data.
The problem involves two or more numbers being strung together like this:
23,346
246,802
7,890,123
23,346,246,802,7,890,123
Questions:
First, does this varchar column contain ONLY numbers?
Second,...
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
September 14, 2016 at 6:43 pm
You might also look at the pattern-based splitter function found HERE[/url].
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
September 14, 2016 at 1:19 pm
Because it scans the input data start to finish three times. Once for each total.
The more states you add, the more table scans it is going to...
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
September 14, 2016 at 12:59 pm
Yeah? Well how would *you* feel if Hitler said that about *you* ?!? :crazy:
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
September 14, 2016 at 10:32 am
You can't pivot it back unless you preserve the original ID. See below.
CREATE TABLE #UnPivotExample(code varchar(2), [value] int, id int)
INSERT INTO #UnPivotExample (code,value,id)
SELECT code,value,id
FROM
(SELECT ID, [AZ], [NY],...
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
September 14, 2016 at 9:50 am
Is it just me, or is the syntax for PIVOT/UNPIVOT *much* harder to follow than cross-tab or APPLY VALUES ?
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
September 14, 2016 at 8:57 am
I say CTE... you say DT... let's call the whole thing off!
I should change my example to use nested CASE statements and argue that it avoids blocking.
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
September 14, 2016 at 8:48 am
Great minds?
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
September 14, 2016 at 8:31 am
Here you go. Cross applying the values clause gives you both the difference (df) and final mark (fm) for each combination on a separate row. The...
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
September 14, 2016 at 7:26 am
(ever get involved with the highlander series of movies?)
Not after the first one, but I am a big fan of Lazarus Long.
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
September 14, 2016 at 6:48 am
It's the STUFF that dreams are made of... 😛
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
September 14, 2016 at 6:44 am
+1
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
September 13, 2016 at 8:55 pm
Jeff, I've got someone trying to get that information now. But by my calculations, it's doing 444 rows per second. That seems slow.
Curiously, the execution plan...
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
September 13, 2016 at 7:46 am
Viewing 15 posts - 196 through 210 (of 4,080 total)