I'm trying to group a bunch of data by the company name with all unique data for that company after it Example table Company name   Company Address   Order Number Company 1        Address 1         0001 Company 1        Address 1         0002 Company 2        Address 2         0003 Company 2        Address 2         0004 Company 3        Address 3         0005  What i would like is for the output to be like this Company name     Company Address   orders Company 1        Address 1         0001,002 Company 2        Address 3         0003,004 Company 3        Address 3         0005
I'm trying to migrate a MySQL-based app over to Microsoft SQL Server 2005 (not by choice, but that's life).  In the original app, we used almost entirely ANSI-SQL compliant statements, with one significant exception -- we used MySQL's group_concat function fairly frequently.  group_concat, by the way, does this: given a table of, say, employee names and projects...  SELECT empName, projID FROM project_members;   returns:  ANDY   |  A100 ANDY   |  B391 ANDY   |  X010 TOM    |  A100 TOM    |  A510   ... and here's what you get with group_concat:  SELECT      empName, group_concat(projID SEPARATOR ' / ')  FROM      project_members  GROUP BY      empName;   returns:  ANDY   |  A100 / B391 / X010 TOM    |  A100 / A510   So what I'd like to know is: Is it possible to write, say, a user-defined function in SQL Server which emulates the functionality of group_concat?   I have almost no experience using UDFs, stored procedures, or anything like that, just straight-up SQL, so please err on the side of too much explanation :)
Is it possible to change the Environment of a parent process in Python? In Linux When I invoke python from the shell it replicates its environment, and starts the python process. Therefore if I do something like the following:  import os os.environ["FOO"] = "A_Value"   When the python process returns, FOO, assuming it was undefined originally, will still be undefined. Is there a way for the python process (or any child process) to modify the environment of its parent process?  I know you typically solve this problem using something like  source script_name.sh   But this conflicts with other requirements I have. How does wizard & cleric spell preparation and casting work? In 3.X wizards had spellbooks, while clerics had their entire spell list, but they both memorized/prepared spells every day from those lists, and had a certain number of slots for preparing spells in.  Now in 5e preparing spells and spell slots aren't the same thing. What's going on here? How does their spellcasting work now? Limits, find a limit that exist in absolute value but not outside the absolute value. Let I be an open interval that contains the point c and let f be a function that is defined on I except possibly at the point c. Suppose that lim |f(x)| as x->c exists. Give an example to show that lim f(x) as x->c may not exist.   Not really sure of an example for this? Why are POSIX Find Parameters Different from Other Program styles? Why is a parameter in the POSIX find command added with a single hyphen for multi-character parameter names, while most other programs use single hyphen to indicate multiple single-character flags, and double-hyphens to indicate single parameter names with multiple characters?  This seems inconsistent, and I'm curious as to  A. why it's really not inconsistent, or  B. the history of that decision. How do I survive in the Nether? Whenever I travel to the Nether in Minecraft, I almost instantly get blasted to smithereens and chopped up into little pieces.  How do I survive in the Nether, at least long enough to build some sort of shelter and get situated? Coupon Collector Problem with Batched Selections File.Copy is giving exception Show vote counts on activity>comments page It would be helpful to show vote counts on the activity > comments page, and also allow sorting by votes.  This would make it easy to see what comments other people thought were valuable or at least amusing. In one of the concluding scenes of the movie Thor, it's shown that Loki deliberately let go of the Scepter, and falls deep into the vast intergalactic sea sort of thing. How does he survive and return in The Avengers? Take the square $[0,1]^2$ we take $n$ random lines through the square. You can choose random lines by choosing a point on one of the sides of the squares and randomly choosing a different point on any of the other three sides and then drawing a line connecting them.   What is the probability that after $n$ of these random lines the largest region is greater than or equal to $0.5$?  Any tips or cases help, thanks. Auto comment "possible duplicate of ..." missing on voting to close as duplicate Please refer to the following question:    The  had posted an  a while back.  I posted a comment referring to the same and voted to close the question as a duplicate of the referenced question.  Surprisingly, an auto comment saying "possible duplicate of ..." was not generated.  I agree that the referenced question shows up in the linked questions list but an auto comment ought to be generated.  Seems like a bug.    EDIT: I understand that the above behavior is by-design.  However, I'd say that the behavior in the following case should also be the same:  It's interesting to see that the auto comment would be generated if you were to add a comment linking to an answer and then voting to close the question as duplicate.  For example, observe the following question: I`m using the Newton-Raphson method for obtaining MLE for parameters for maximizing my objective function. At each iteration, I want to check that is the Hessian matrix negative definite or not and I see the Hessian matrix is not negative definite at some iterations. So, I want to use the Fisher scoring algorithm ( of derivation) In this situation, the Fisher information matrix is indefinite!! Is it possible? What are the reasons for this? Are the second-order derivatives wrong? Or are values of expectations incorrect? When and what cause Voldemort to look the way he does, vs how we've seen him as a teen? As the title says, when and what made Voldemort look the way he does (pale, snake-like etc) as opposed to how we've seen him in his earlier years as Tom Riddle? Is it just a side effect of his unnatural resurrection? Before he died attacking Harry as a baby did he look like a normal guy? Search for singleton tags on questions Why does `\texttt` repeat and shrink my equation? When I use \texttt with the caret symbol in an amsmath equation environment, I get a very weird result. Specifically, the text repeats itself four times while shrinking.  MWE:  \documentclass{article} \usepackage{amsmath}  \begin{document}  \begin{equation*}     \texttt{y^o} \end{equation*}  \end{document}   Compiling this document with pdflatex produces the following result:    The same result occurs even if I remove the o character. To fix it I could modify the offending line to \texttt{y$^o$}, but why is this repeating happening in the first place? Given a Java InputStream, how can I determine the current offset in the stream? I'd like something like a generic, re-usable getPosition() method that will tell me the number of bytes read from the starting point of the stream.  Ideally, I would prefer this to work with all InputStreams, so that I don't have to wrap each and every one of them as I get them from disparate sources.  Does such a beast exist?  If not, can anyone recommend an existing implementation of a counting InputStream? How to prove that we are living in a 3+1D world? Is there any scientific experiment that can lead us to conclude we live in 3 spatial dimensions without the premise of the conception of limited dimensions?  Thank you all who helped in the improvement of this question (which was not clear at first).   EDIT:  I know that this can be a little philosophical, but it is also a scientific question.  Let's consider the scenario where the mankind was not ever able to see.  Let's also consider that this limitation could be surpassed thus not limiting us to reach a scientific and technological knowledge "similar" to what we have today.  Would this civilization of blind people reach the conclusion that they are living in a 3D spatial world?  Is the sense of touch enough to reach that conclusion? Is there any scientific experiment that can lead us to that conclusion without the premise of the conception of limited dimensions?  Would it be easier, harder, or just different to reach a conclusion predicted by the M-Theory? (please do not focus only on this last question) Does a card have a keyword if it has the same effect as said keyword? I was looking at  and found the effect surprisingly similar to the keyword Surveil. To compare, first the wording of Contingency Plan and then the wording of the Surveil keyword:       Look at the top five cards of your library. Put any number of them into your graveyard and the rest back on top of your library in any order.     And       701.41a To "surveil N" means to look at the top N cards of your library, then put any number of them into your graveyard and the rest on top of your library in any order.     They quite clearly are the same, so can I assume the card states "Surveil 5" instead? And if so, does it trigger abilities which state "Whenever you surveil ..."? Change how questions marked as duplicates by the asker are represented Situation: when a user self-marks their post as a duplicate, it shows as closed by "community" rather than the original poster.  Problems: this is not clear at all to most users of SE what has happened. It looks like the question was "mod closed" as a duplicate against the asker's wishes.    Suggestion: instead of the community user "closing" the post, have the final close user be the asker (or make it "Community &amp; Asker"). This will help clear up confusion and streamline the process for understanding what happens. How can I disable the Windows 8 charms bar? Can someone please tell me how to disable the annoying effect that pops up when you drag cursor to top- or bottom-right corners?