So I have the following tables:  Table 1  fname    mi    lname    empid  John     A     Smith    1202 Bob            Doe      9815   Table 2  unid    empid  1015     1202 1015     9815   Table 3  unid    Item  1015    ABC 1015    DEF   My intended output should be (when supplying unid=1015)  fname    mi    lname    item  John     A     Smith    ABC, DEF Bob            Doe         Now that would be the ideal, but I'm more than happy to deal with the repeated [Item] values on the front end.    My current statement is:  select p.FNAME,p.MI,p.LNAME, ac.EQUIP from table1 t1, table2 t2, table3 t3   where t1.EMPID = t2.EMPID and t2.UNID = t3.UNID and t2.unid = '1015' group by t1.FNAME, t1.MI,  t1.LNAME,t3.EQUIP   For the life of me, I cannot figure out how get the values in item (which can be 0 or more to a maximum of 8) as one comma separated string.  My problem is, due to site/client constraints, I cannot use an SP but this has to be done in one SQL statement.  This is on SQL SERVER 2008 R2.
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 :)
Can Windows Virtual PC run a 64-bit OS? Let $G=\langle a\rangle$ be a cyclic group of order $n$. Show that, for every divisor $d$ of $n$, there exists a subgroup of $G$ whose order is $d$. Given the function: $$f(x) = \begin{cases} x\cdot\sin(\frac{1}{x}) &amp; \text{if $x\ne0$} \\ 0 &amp; \text{if $x=0$} \end{cases}$$  Question 1: Is $f(x)$ continuous at $x=0$?  Question 2: What is the derivative of $f(x)$ at $x=0$ and how do I calculate it? I have seen some very weird for loops when reading other people's code. I have been trying to search for a full syntax explanation for the for loop in C but it is very hard because the word "for" appears in unrelated sentences making the search almost impossible to Google effectively.  This question came to my mind after reading  which made me curious again.  The for here:   for(p=0;p+=(a&amp;1)*b,a!=1;a&gt;&gt;=1,b&lt;&lt;=1);   In the middle condition there is a comma separating the two pieces of code, what does this comma do? The comma on the right side I understand as it makes both a&gt;&gt;=1 and b&lt;&lt;=1.   But within a loop exit condition, what happens? Does it exit when p==0, when a==1 or when both happen?  It would be great if anyone could help me understand this and maybe point me in the direction of a full for loop syntax description. how to extract multiple zipped and rar files recursively? I have a folder ExampleFolder which contains many zipped folders. These zipped folders also contains multiple zipped folders. How to go through ExampleFolder and extract all of its zipped folders recursively?   Note that ExampleFolder itself, is not zipped, it's just a normal folder  Okay now I know what's happening Rinzwind and nux answers are both correct (except that I have to keep pressing Y or A forever)  But it's seems that some of the zipped files, contained zipped files and rar files as well, the rar files will not be extracted by   while [ "`find . -type f -name '*.zip' | wc -l`" -gt 0 ]; do find -type f -name "*.zip" -exec unzip -- '{}' \; -exec rm -- '{}' \;; done    or whatever  Edit 2 Some files are named .r00 and r01, .r02 up to r14, they are rar files, but not .rar I am getting the following error in a Drupal 8 site.     The following module is missing from the file system   It looks as if a custom module was installed and deleted without uninstalling it.   How can I fix this error? The following example works as expected:  \documentclass{article} \usepackage[table]{xcolor} \usepackage{makecell, multirow}     \renewcommand\theadfont{\normalsize\bfseries\color{white}}     \renewcommand{\theadgape}{} \usepackage{hhline}  \begin{document} \centering     \setlength\arrayrulewidth{2pt}     \arrayrulecolor{yellow}     \def\clinecolor{\hhline{&gt;{\arrayrulecolor{yellow}}--%                             &gt;{\arrayrulecolor{gray}}-}}     \setlength\extrarowheight{2pt} \begin{tabular}{ c | c | c }%     \rowcolor{gray} \multicolumn{2}{c|}{\thead{AAA -- BBBB}}    &amp;                                   \\     \clinecolor     \rowcolor{gray} \color{white} AAA   &amp;   \color{white} BBB   &amp;   \multirow{-2}{*}{\thead{CCC}}   \\     \hhline{&gt;{\arrayrulecolor{yellow}}-|-|-}     \rowcolor{gray!25} aaa                 &amp;   bbb                 &amp;   ccc                             \\     \hline     \rowcolor{gray!25} ddd             &amp;   eee                 &amp;   fff     \end{tabular} \end{document}     But the following not:  \documentclass[xcolor=table]{beamer} \usepackage{makecell, multirow}     \renewcommand\theadfont{\normalsize\bfseries\color{white}}     \renewcommand{\theadgape}{} \usepackage{hhline}  \begin{document} \begin{frame} \frametitle{test} \centering     \setlength\arrayrulewidth{2pt}     \arrayrulecolor{yellow}     \def\clinecolor{\hhline{&gt;{\arrayrulecolor{yellow}}--%                             &gt;{\arrayrulecolor{gray}}-}}     \setlength\extrarowheight{2pt} \begin{tabular}{ c | c | c }%     \rowcolor{gray} \multicolumn{2}{c|}{\thead{AAA -- BBBB}}    &amp;                                   \\     \clinecolor     \rowcolor{gray} \color{white} AAA   &amp;   \color{white} BBB   &amp;   \multirow{-2}{*}{\thead{CCC}}   \\     \hhline{&gt;{\arrayrulecolor{yellow}}-|-|-}     \rowcolor{gray!25} aaa                 &amp;   bbb                 &amp;   ccc                             \\     \hline     \rowcolor{gray!25} ddd             &amp;   eee                 &amp;   fff                             \\     \hhline{|-|-|-|}     \end{tabular} \end{frame} \end{document}     Why are the in beamer rules so strangely misplaced? Is there some workaround? How do I choose grid and block dimensions for CUDA kernels? Counting number of vertices of polygons and lines in QGIS? In QGIS, is there a way to count the number of vertices of polygons and lines in a given layer, and create a separate field containing these values?   I suspect it's a function somewhere in the field calculator but I can't find it. I have the following sentence:     If T had still been alive, there is the great possibility that either T or C ...   My teacher says that the word "then" must appear after the comma, but I think that it's implied and unnecessary. Who is right? Why is integration the inverse of differentiation Why doesn't my systemd user unit start at boot? Acer Aspire E15 will not dual boot I installed Ubuntu 14.04 onto my Acer Aspire E15. The PC has a 500 Gigabyte HDD.   During the installation it divided the HDD into separate partitions. However every time I turn on the PC it goes directly into Windows 8.1. It doesn't allow you the opportunity to select which OS you want to use.   Question 1: How do I set the PC so it will allow me to select the OS?  Question 2: And if #1 isn't possible. How to I remove Ubuntu from the PC and recover the partition for Windows The Wiki page on  says     The pair $(m, m+2)$ is twin prime, iff $4((m-1)! + 1) \equiv -m \pmod {m(m+2)}$.   This is obviously connected to Wilson's Theorem. Can anybody provide a proof for that, along the lines of thought given here, ? Does and has both are used with singular pronouns (He has the bottle , He does play cricket , etc) whereas Do and have are used with plural pronouns ( They have the bottle , Do they like cricket? , etc)  But still we use Does with have ( She does have a car ). Why? Shouldn't it be     She does has a car. What do I call someone who marries or has a sexual relationship with someone much younger than themselves? Their partner is someone who is at least 18 years old.    The term paedophile is not the correct word, because it refers to minors. Closed form for $\int_0^\infty\frac{1}{(1+x^2)^s}\,dx$ when $s\in (0.5,\infty)\setminus\mathbb{N}$ How can I repair a buried 120v cable splice to make it meet code? I have an electrical question. I have a cable feeding an outdoor yard light. It was cut, I spliced it, soldered it and wrapped it with tape. Is there a way to splice and bury it safely to code? If not, I'll need to dig a 30 foot trench to replace the whole length.  Was about 8 inches below ground, surfaced over the years and probably hit with the weed trimmer.   It is outdoor cable inside copper tubing. Years ago when I bought the wire I knew outdoor was gray. The box said outdoor but it is white like indoor wire.   It was spliced about 20 years ago but am fixing up house and like to hide the ugly splice. Powershell auto complete settings. I was wondering if there was anyway to change the way the current powershell autocomplete works. I have been using bash and had changed them to offer a few features that I'd like in my powershell experience.   Currently powershell as I'm writing a command with a folder it will tab autocomplete and also cycle through my folders. This works how I like but one feature that I miss is using partial matching of a command and hitting the up key and it would find that command that matches the rest of what I do.   So Id write 'echo test'  Then id write other commands and try 'ec' and tap up and 'echo test' would complete and not the last command I typed  Just wondering if there is anyway anyway to get this back? "Try Ubuntu" option is not dislayed