Viewing 15 posts - 1,726 through 1,740 (of 3,957 total)
Hi Svetlana!
I think this is a nice introductory tutorial on using rCTEs.
However like a couple of folks that have already replied, I'd do it a little differently:
WITH Offices AS (
...
July 9, 2013 at 4:25 am
dwain.c (7/8/2013)
Steve Jones - SSC Editor (7/8/2013)
Notifications working for people? Seem like the queue might be stuck.
Queue is definitely still stuck, although I did just receive one notification on this...
July 8, 2013 at 8:07 pm
reid.kell (7/3/2013)
...I need two of the 35 values (SubnetMask and SubnetDescription) for each of the 5000+ records in this long, continuous file. ...
reid.kell (7/8/2013)
July 8, 2013 at 7:36 pm
Steve Jones - SSC Editor (7/8/2013)
Notifications working for people? Seem like the queue might be stuck.
Queue is definitely still stuck, although I did just receive one notification on this thread...
July 8, 2013 at 7:25 pm
Jeff Moden (7/8/2013)
L' Eomot Inversé (7/7/2013)
jasona.work (7/5/2013)
Koen Verbeeck (7/5/2013)
jasona.work (7/5/2013)
I...
July 8, 2013 at 7:24 pm
Excuse me for asking a dumb question here but the OP says the TransactionID is the primary key with presumably a clustered index on it (my assumption).
In that case, without...
July 8, 2013 at 7:18 pm
Assuming your Excel sheet is accessible from the SQL Server, you can use Chrissy's INNER JOIN on an OPENROWSET to read directly from the Excel sheet.
July 8, 2013 at 6:35 pm
Hoo-uh! And here I thought everyone had forgotten this thread.
I'm not surprised by the results. I've had to clock down the machine I did this timing test on...
July 8, 2013 at 6:29 pm
I hesitate to say this but I don't think you've got enough information to solve this.
Any query that might appear to solve it would need to rely on the ordering...
July 7, 2013 at 6:57 pm
Jeff Moden (7/5/2013)
dwain.c (7/4/2013)
What in Buddha's name is a "lac day?""lac" is 100,000 in the OP's language.
Oh, I get it! It can be used like a productivity measure:
SLOC/lac-days
July 6, 2013 at 12:50 am
Sean Pearce (7/5/2013)
dwain.c (7/4/2013)
Jeff Moden (7/4/2013)
The other thing to worry about is that XML will entitize (change to a code sequence) certain characters if they are present.
I don't...
July 5, 2013 at 4:35 am
Flattery will get you everywhere! 🙂
But, I actually saw the UNION ALL method the first time in the discussion...
July 5, 2013 at 1:40 am
What an odd requirement!
Mark - That's a pretty slick approach.
Using Eugene's suggestion of a Crosstab query, this is the best (or at least the least messy approach) I could come...
July 5, 2013 at 12:21 am
Jeff Moden (7/4/2013)
The other thing to worry about is that XML will entitize (change to a code sequence) certain characters if they are present.
I don't suppose you'd know...
July 4, 2013 at 11:55 pm
What, no takers? OK then I'll go for it.
Test harness (now 1M rows):
/**************************************************
(1) Sample Data
**************************************************/
IF OBJECT_ID('tempdb..table1') IS NOT NULL
DROP TABLE table1;
IF OBJECT_ID('tempdb..table2') IS NOT NULL
DROP TABLE table2;
IF OBJECT_ID('tempdb..tally') IS...
July 4, 2013 at 7:38 pm
Viewing 15 posts - 1,726 through 1,740 (of 3,957 total)