August 8, 2016 at 9:13 am
Hugo Kornelis (8/6/2016)
Jeff Moden (8/5/2016)
drew.allen (8/5/2016)
I'm getting frustrated. http://www.sqlservercentral.com/Forums/Topic1807080-391-1.aspxDrew
Edited to place the bold tags outside of the url.
The OP isn't bagging what you're raking. It may be time to break out the ol' silver platter. π One good demonstration is worth a thousand thought processes. The OP DID post readily consumable code. Should be an easy demo for anyone that wants to.
Not until we are sure what the actual specs are supposed to be. Otherwise we may be silver-plattering him the correct answer to the wrong question.
yes, I agree - we don't really have much idea what is required.
One interesting question is whether he wants do this for all (or a large set of) chains in just one query or does he want to do just one chain at a time. Another is whather the table contains only unbranching chains (like his test data) , or whether a stakehoder,stage pair can have more than one immediate successor (ie the question is about trees, not about linear chains) - his data structure is capable of representing either. I don't see any obvious way to define keys and constraints that would restrict it to linear chains without changing the data structure, but given what I've seen of schema designs in the past (:sick:) that's no real indication that such a restriction wasn't required. And of course the structure can also support both branching and merging, which is the general pattern for most producer tasks, for example development, and deployment, and manufacturing.
Assuming that only linear chains are supported, the idea of going up the chain from the known point in one CTE and down from the known point in another and having the main part of the query use the union of those two CTEs (one of the CTEs has to take care to leave the known point out, the other has to include it) seems to me to be the best approach. But the OP wanted a way of going to the start point from the known point and then finding all successors recursively from there, which would work for the less constrained structures (but might need some optimising) and on average deliver only two thirds of the performance on linear chains that the two parts and a union approach would, so maybe he does want trees (or even a generalized DAG) although his test data has no branching (or merging) in it.
So without more information it looks to me as if it would be very easy indeed to deliver something on a sliver platter and discover that what was wanted would be more approrately delivered in a plastic bag.
edit: Change to use "known point" and "start point" consistently to avoid confusion between the two.
Tom
August 8, 2016 at 9:31 am
TomThomson (8/8/2016)
So without more information it looks to me as if it would be very easy indeed to deliver something on a sliver platter and discover that what was wanted would be more approrately delivered in a plastic bag.
Thanks Tom. Got all the way to the end and then let out a rare Monday guffaw π
The absence of evidence is not evidence of absence
- Martin Rees
The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
- Phil Parkin
August 8, 2016 at 12:31 pm
I see Brent Ozar is using torrent for the Stack Exchange Data Dump...I would dearly like to get the data for a future project, but am quite concerned about the potential security issues of using torrent.
link to post https://www.brentozar.com/archive/2015/10/how-to-download-the-stack-overflow-database-via-bittorrent/
whilst I appreciate his comments on the cost, what does everyone else think about using torrent?
If I go ahead this will be on personal network / hardware.
________________________________________________________________
you can lead a user to data....but you cannot make them think
and remember....every day is a school day
August 8, 2016 at 2:01 pm
J Livingston SQL (8/8/2016)
I see Brent Ozar is using torrent for the Stack Exchange Data Dump...I would dearly like to get the data for a future project, but am quite concerned about the potential security issues of using torrent.link to post https://www.brentozar.com/archive/2015/10/how-to-download-the-stack-overflow-database-via-bittorrent/
whilst I appreciate his comments on the cost, what does everyone else think about using torrent?
If I go ahead this will be on personal network / hardware.
torrent is pretty scary to say the least. I have used it in the past for a few things. What I did was created a new machine and installed the torrent client there. Then copied the file to another machine and reformatted the newly created torrent OS. I realize this is still not bullet proof but at least if some nasty viruses managed to get through thanks to all the holes in torrent they were isolated to that machine and formatted off pretty quickly after.
_______________________________________________________________
Need help? Help us help you.
Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.
Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.
Cross Tabs and Pivots, Part 1 β Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/
August 9, 2016 at 5:58 am
This code was generated by a tool.
Does anyone else subconsciously say "You can say that again" whenever they read this comment in auto-generated code? π
The absence of evidence is not evidence of absence
- Martin Rees
The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
- Phil Parkin
August 9, 2016 at 6:05 am
Phil Parkin (8/5/2016)
ThomasRushton (8/5/2016)
Brandie Tarvin (8/5/2016)
A million things to do at work and they want me off my PC. I've got a new one I've got to configure.So I'm importing my outlook rules, my IE favorites & settings. My Chrome bookmarks, my Word Normal template. I've customized my SSMS settings on the new box...
Can anyone think of anything else I should consider (things that you all might customize and would want to save if you were getting kicked off your well-worn box)?
SSMS (and other) code snippets? SQLPrompt ditto?
Don't forget to deauthorise any licences you may have on the old machine.
That is being taken care of by our CTS / Help Desk.
August 9, 2016 at 6:07 am
Luis Cazares (8/5/2016)
djj (8/5/2016)
Brandie Tarvin (8/5/2016)
A million things to do at work and they want me off my PC. I've got a new one I've got to configure.So I'm importing my outlook rules, my IE favorites & settings. My Chrome bookmarks, my Word Normal template. I've customized my SSMS settings on the new box...
Can anyone think of anything else I should consider (things that you all might customize and would want to save if you were getting kicked off your well-worn box)?
Sigh. I've got REAL work to do... and I'm losing my extra drive... With all that wonderful space that of course I like to use...
If you have browser passwords saved you will need at least a list of sites to visit to enter on the new computer.
I always forget programs like zip or cclean. Remember if you have a package that is licensed on old, that you may need to unlicense it before turning it off.
The wonderful thing about Chrome is that it automatically transfers bookmarks, saved passwords, settings, plug-ins, etc. You just need to login with your Google account.
You mentioned that you had SSMS settings, so I suppose that includes Registered Servers (I can't memorize the server names in here).
Templates, connections, drivers must be something to check. Once I couldn't get an SSIS package to work because I missed the attunity drivers for Oracle.
DRIVERS! That's what I forgot.
Thanks for that.
And thank you to everyone else for their suggestions also. This is helping.
August 9, 2016 at 6:32 am
Phil Parkin (8/9/2016)
This code was generated by a tool.
Does anyone else subconsciously say "You can say that again" whenever they read this comment in auto-generated code? π
Thanks for sharing Phil, this raised a few belly laughs here π
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
August 9, 2016 at 8:12 am
Phil Parkin (8/9/2016)
This code was generated by a tool.
Does anyone else subconsciously say "You can say that again" whenever they read this comment in auto-generated code? π
It's more appropriate for code generated by certain human beings than for some auto-generated code.
Tom
August 9, 2016 at 9:17 am
I see that the cheap kitchens in the UK are back again.
August 9, 2016 at 9:18 am
TomThomson (8/9/2016)
Phil Parkin (8/9/2016)
This code was generated by a tool.
Does anyone else subconsciously say "You can say that again" whenever they read this comment in auto-generated code? π
It's more appropriate for code generated by certain human beings than for some auto-generated code.
I guess it depends on the human who typed it, but you're both way too right in way too many cases.
August 9, 2016 at 9:21 am
TomThomson (8/9/2016)
Phil Parkin (8/9/2016)
This code was generated by a tool.
Does anyone else subconsciously say "You can say that again" whenever they read this comment in auto-generated code? π
It's more appropriate for code generated by certain human beings than for some auto-generated code.
Who's going to be first to use it here?
"Was this code generated by a tool?"
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
August 9, 2016 at 9:23 am
ChrisM@Work (8/9/2016)
TomThomson (8/9/2016)
Phil Parkin (8/9/2016)
This code was generated by a tool.
Does anyone else subconsciously say "You can say that again" whenever they read this comment in auto-generated code? π
It's more appropriate for code generated by certain human beings than for some auto-generated code.
Who's going to be first to use it here?
"Was this code generated by a tool?"
I think we can often go a step further: "Which tool generated this code?"
The absence of evidence is not evidence of absence
- Martin Rees
The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
- Phil Parkin
August 9, 2016 at 10:59 am
Phil Parkin (8/9/2016)
This code was generated by a tool.
Does anyone else subconsciously say "You can say that again" whenever they read this comment in auto-generated code? π
lol
Sometimes, yes!!
Jason...AKA CirqueDeSQLeil
_______________________________________________
I have given a name to my pain...MCM SQL Server, MVP
SQL RNNR
Posting Performance Based Questions - Gail Shaw[/url]
Learn Extended Events
August 9, 2016 at 11:06 am
Sean Lange (8/8/2016)
J Livingston SQL (8/8/2016)
I see Brent Ozar is using torrent for the Stack Exchange Data Dump...I would dearly like to get the data for a future project, but am quite concerned about the potential security issues of using torrent.link to post https://www.brentozar.com/archive/2015/10/how-to-download-the-stack-overflow-database-via-bittorrent/
whilst I appreciate his comments on the cost, what does everyone else think about using torrent?
If I go ahead this will be on personal network / hardware.
torrent is pretty scary to say the least. I have used it in the past for a few things. What I did was created a new machine and installed the torrent client there. Then copied the file to another machine and reformatted the newly created torrent OS. I realize this is still not bullet proof but at least if some nasty viruses managed to get through thanks to all the holes in torrent they were isolated to that machine and formatted off pretty quickly after.
thanks for your thoughts Sean
________________________________________________________________
you can lead a user to data....but you cannot make them think
and remember....every day is a school day
Viewing 15 posts - 55,261 through 55,275 (of 66,712 total)
You must be logged in to reply to this topic. Login to reply