I've seen multiple examples of people rolling up a single column into a comma delimited list, but I need a bit more.  Here is an example of the data and results I need.  DECLARE @SalesPerson table (SalesPersonID int, SalesPersonName varchar(10)) DECLARE @Region table (RegionID int, RegionName varchar(15)) DECLARE @SalesPersonRegion table (SalesPersonID int, RegionID int)  INSERT INTO @SalesPerson (SalesPersonID, SalesPersonName) VALUES (1,'Jeff')  INSERT INTO @SalesPerson (SalesPersonID, SalesPersonName) VALUES (2,'Pat')  INSERT INTO @SalesPerson (SalesPersonID, SalesPersonName) VALUES (3,'Joe')   INSERT INTO @Region (RegionID, RegionName) VALUES (1,'North')  INSERT INTO @Region (RegionID, RegionName) VALUES (2,'South')  INSERT INTO @Region (RegionID, RegionName) VALUES (3,'East')  INSERT INTO @Region (RegionID, RegionName) VALUES (4,'West')   INSERT INTO @SalesPersonRegion (SalesPersonID,RegionID) VALUES (1,1) INSERT INTO @SalesPersonRegion (SalesPersonID,RegionID) VALUES (1,2) INSERT INTO @SalesPersonRegion (SalesPersonID,RegionID) VALUES (1,3) INSERT INTO @SalesPersonRegion (SalesPersonID,RegionID) VALUES (2,2) INSERT INTO @SalesPersonRegion (SalesPersonID,RegionID) VALUES (2,3) INSERT INTO @SalesPersonRegion (SalesPersonID,RegionID) VALUES (2,4) INSERT INTO @SalesPersonRegion (SalesPersonID,RegionID) VALUES (3,1) INSERT INTO @SalesPersonRegion (SalesPersonID,RegionID) VALUES (3,4)   A simple select will get me each sales person, with each of that salesperson's region.  SELECT      sp.SalesPersonID,     sp.SalesPersonName,     r.RegionName FROM @SalesPersonRegion spr     JOIN @SalesPerson sp         ON spr.SalesPersonID = sp.SalesPersonID     JOIN @Region r         ON spr.RegionID = r.RegionID    In this case, it will return 9 Rows.  I would like to get results like this:  SalesPersonID    SalesPersonName      Regions 1                Jeff                 North,South,East 2                Pat                  South,East,West 3                Joe                  North,West
Consider a database table holding names, with three rows:  Peter Paul Mary   Is there an easy way to turn this into a single string of Peter, Paul, Mary?
Determining the number of bit strings of length n that contains no adjacent 0s • $C_n =$ this number of bit strings  • A binary string with no adjacent 0s is constructed by   Adding “1” to any string w of length $n-1$ satisfying the condition, or Adding “10” to any string v of length $n-2$ satisfying the condition   I still don't find that intuitive at all. Why adding up $C_{n-1} + C_{n-2}$ results in $C_n$? I have tried my best and asked my friends for help, but they find the formula unintuitive as well. Could anyone here come up with a clear explanation? Thanks! How do I base64 encode (decode) in C? I have binary data in an unsigned char variable. I need to convert them to PEM base64 in c. I looked in openssl library but i could not find any function. Does any body have any idea? I just broke the screen of my (unrooted) Galaxy S.  How do I get back my SMS and contacts?   PS: I tried Kies but it won't detect my phone for some reason. (Kies works fine with another Galaxy I possess but not this one) In the chapter on Spellcasting, there is a section called . However, despite the seeming generality of the title, the text of this section only talks about magical effects from spells:     The effects of different spells add together while the durations of those spells overlap. The effects of the same spell cast multiple times don't combine, however. Instead, the most potent effect--such as the highest bonus--from those castings applies while their durations overlap, or the most recent effect applies if the castings are equally potent and their durations overlap.   It makes sense that this section would only talk about spells, since it is in the chapter about spellcasting. However, this seems to leave ambiguous the question of how magical effects from sources other than spells combine. Such an issue could arise, for example, if two different items (or two of the same item) grant a bonus to attack rolls, or a bonus to the same saving throw.  Is there a published rule or official ruling that governs how non-spell magical effects combine?  (This question was inspired by  about the interaction between +X magical ammunition and Oil of Sharpness, and could be considered a generalization of that question.) Steam not opening in Ubuntu 16.04 LTS I have never used Ubuntu or any other Linux OS before last Friday. For all I know, I might have installed Ubuntu wrong and be missing a component. I would prefer if you use simplest terminology possible, but I'm OK with doing a bit of googling if need be. I just installed Steam for Ubuntu 16.04 but it won't open when I click on it in the launcher. The icon flashes for a few seconds, stops and then nothing happens. I looked in the system monitor and steam shows up there but ending the process and trying again does nothing. I heard trying to open apps that aren't working through the terminal tells you what the error is so I tried that and I got this:  Running Steam on ubuntu 16.04 64-bit STEAM_RUNTIME is enabled automatically Installing breakpad exception handler for appid(steam)/version(0) libGL error: unable to load driver: radeonsi_dri.so libGL error: driver pointer missing libGL error: failed to load driver: radeonsi libGL error: unable to load driver: swrast_dri.so libGL error: failed to load driver: swrast   Please help I just want to play CS:GO again. Is there a Unix command to get the absolute (and canonicalized) path from a relative path which may contain symbolic links? What is Kirito's relationship with the girls of SAO? Save an entire webpage, with all images and css, into just one folder and one file, with wget? Preseed Ubuntu 16.04 not working (preseed file not found) I've been trying to preseed my installation for 2 days now. I'm quite new in this topic, so execuse me if I'm asking noob questions. How do I use boot parameters, how do I know that my preseed file works. When is my preseed file loaded I have forgotten my keystore password and I want to install my apk on Google Play. What do I do? Make a file pointer read/write to an in-memory location 1) Alex's house      2) Alex' house     When the noun ends with the letter 's' or 'x', do I need to put 's' after an apostrophe or not?  I remember I read some rules related to this in my school grammar book, but now I've forgotten it. Are battery packs allowed in hand luggage? When flying, are you allowed to bring battery packs / power banks? I'd like to bring my ACC 10400mAh Power Bank on several flights. Near the beginning of the definition of the amsmath environments aligned and gathered (and also mathtools' multlined) there's an explicit thin space \,. This often  has to be cancelled  with  \!, as has been observed  various  times:         I'd like to know why this explicit \, is there &ndash; what would go wrong without it?    From amsmath.dtx:  \newcommand{\start@aligned}[2]{%     \RIfM@\else         \nonmatherr@{\begin{\@currenvir}}%     \fi     \savecolumn@ % Assumption: called inside a group %    \end{macrocode} %    The \cs{null} here is to keep the \cs{,} glue from causing the %    invocation of the clause in \tex/'s built-in tag placement %    algorithm that can cause an equation to be shifted all the way over %    to the margin. %    \begin{macrocode}     \null\,% What happens when a moderator clicks 'leave open' in the close-vote queue? It takes  clicking "leave open" in the close-vote queue to remove the question from the queue.  How about diamond mods?  Do they remove it from the queue in one click, or not? Is volunteer work allowed in the US while visiting under the VWP or a B1/B2 visa? I am going to Santa Monica for 4 weeks to polish my English in July and would like to volunteer at the Planetary Society located in Pasadena.  I am a Swiss citizen and have a biometric passport. However, I don't have any special visa, as there is no visa needed for the school I am attending and using the Visa Waiver Program, I am allowed to stay up to 90 days in the US.  Am I allowed to do volunteer work during my stay? How do I create a Java string from the contents of a file? I've been using the idiom below for some time now. And it seems to be the most wide-spread, at least on the sites I've visited.  Is there a better/different way to read a file into a string in Java?  private String readFile(String file) throws IOException {     BufferedReader reader = new BufferedReader(new FileReader (file));     String         line = null;     StringBuilder  stringBuilder = new StringBuilder();     String         ls = System.getProperty("line.separator");      try {         while((line = reader.readLine()) != null) {             stringBuilder.append(line);             stringBuilder.append(ls);         }          return stringBuilder.toString();     } finally {         reader.close();     } } As you are all most likely aware already all domain registrars ask for your personal information.   Such personal information includes:   Forename and surname Address information Email address Telephone number   Personal information via WHOIS  Depending on the domain type such as  or  this information may become immediately available after the registration of the domain via a simple whois. If you do not want that (and in most cases you certainly don't) they offer a service where you can remove this information from the whois service but of course hiding your personal information adds yearly costs to the domain  purchase.  What happens if I use fake details when registering a domain? I know that Dirichlet function has uncountable many discontinuities. I think they are removable, because the discontinuities can be removed by redefining the function values of the rational numbers as 0.  So Dirichlet function is a function that has uncountable many removable discontinuities, then my question is can we construct a function with uncountable  many jump discontinuities? If not, how do we prove it is impossible? Thank you.  An odd but similar question is can we have a function that has uncountable many infinite discontinuities? Using the field of an object as a generic Dictionary key If I want to use objects as the keys for a Dictionary, what methods will I need to override to make them compare in a specific way?  Say I have a a class which has properties:  class Foo {     public string Name { get; set; }     public int FooID { get; set; }      // elided }    And I want to create a:  Dictionary&lt;Foo, List&lt;Stuff&gt;&gt;   I want Foo objects with the same FooID to be considered the same group.  Which methods will I need to override in the Foo class?  To summarize: I want to categorize Stuff objects into lists, grouped by Foo objects. Stuff objects will have a FooID to link them to their category.