I need this scenario based query.  SalesID Line    Noofitems   Category    Desc SID12345    1   1           Metal-SI    Strong iron SID12345    2   1           Plastic     Disposal SID12345    3   1           Plastic     Disposal   Expected Output  SalesID     Totitems    Category            Desc SID12345    3           Metal-SI,Plastic    Strong iron,Disposal
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 :)
Identification of mid-80s time travel tv show Is a photon "fixed in spacetime"? How do you normalize a zero vector I would like my Dock to show only the windows of the current workspace. Especially in the little preview window. I find it very confusing to jump around workspaces when trying to find the right window. Why shouldn't we allow NULLs? I remember reading this one article about database design and I also remember it said you should have field properties of NOT NULL.  I don't remember why this was the case though.  All I can seem to think of is that, as an application developer, you wouldn't have to test for NULL and a possible nonexistent data value (for instance, an empty string for strings).  But what do you do in the case of dates, datetime, and time (SQL Server 2008)?  You'd have to use some historic or bottomed-out date.  Any ideas on this? Double decimal formatting in Java Every package "has no installation candidate" While attempting to install openssh-server on Ubuntu 14.04 64-bit, I get the following error:  Package openssh-server is not available but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source  E: Package 'openssh-server' has no installation candidate   I see the same error when trying to install any package.  This is the sources.list file:  deb http://archive.canonical.com/ubuntu hardy partner deb-src http://archive.canonical.com/ubuntu hardy partner I've got an iPhone app with icon file Icon.png.  This icon shows up properly when the app is on the phone itself, but it doesn't show up in the applications pane in iTunes.  What do I need to do to get it to show up properly? I have a scrbook document with an openright option, i.e. every once in a while a blank left page appears in the document. Not that I really want to do this, but how could I include the infamous "This page has been intentionally left blank" in those blank pages cleanly, i.e. without too many hacks?  Bonus points for including a different famous quote on each blank page instead of the dull default ;) Prove that: $(f(x))^{2} + (f'(x))^{2} \leqslant \max(a,b)$ where $(a,b) \in \mathbb{R}^2$ Let $f\in C^2(\mathbb{R},\mathbb{R})$.   Assume there exist  $(a,b) \in \mathbb{R}^2$ such that  $\forall x \in \mathbb{R}, (f(x))^{2} \leqslant a$ and $(f'(x))^{2} + (f''(x))^{2} \leqslant b$.   Prove that: $$(f(x))^{2} + (f'(x))^{2} \leqslant \max(a,b)$$ for all $x \in \mathbb{R}$.   I tried to use taylor lagrange with the integral form of the remainder but I did not succeed.  Ì really don't know how to tackle  the problem.   Any suggestion, Hint (or Answer) will be very helpful,  Thank you in advance, Let $F$ be a field, let $\omega$ be a primitive $n$th root of unity in an algebraic closure of $F$. If $a$ in $F$ is not an $m$th power in $F(\omega)$ for any $m\gt 1$ that divides $n$, how to show that $x^n -a$ is irreducible over $F$? Find the equation of a plane containing a point and passing through a line Find the general form equation of a plane that contains the point $(2, -2, 1)$ and passes through a line $(x, y, z) = (1, 2, -3) + t(2, -3, 2)$.  I managed to use the fact that it contains a given point to write the equation of the plane as $A(x-2) + B(y+2) + C(z-1) = 0$ but got stuck there. How to implement "select all" check box in HTML? Why are there two tensions on my free body diagram? Why are some of my screen-recording/capturing/sharing applications (or app features) not working in Ubuntu 17.10 (and later releases)? I'm trying to change the numbers in problems I write for examples I use in my class as well as assignments. However the problems are still inspired by the textbook. Are the problems sufficiently different from the textbook problems to not have copyright issues? There is also an issue of theorems and definitions. Authors of the calculus textbook certainly did not come up with these things. Is it OK to just copy them down in my lecture notes?  By the way I do share my lecture notes on Piazza and the course I'm teaching is multivariable calculus. Is there a way to convert an image to grayscale? Parentheses around more than one paragraph Does English allow one to put parentheses around more than one paragraph? Example:     Paragraph 1.      (Paragraph 2.      Paragraph 3.)      Paragraph 4.   (Of course, this is just a simple example. In reality, it looks more clean since the paragraphs are more than one line long, and are not separated by an empty line.) I'm seeing an odd character like a very flat U, where there should be a space, with the listings package. See example below. Does anyone have any idea why this is happening, or how to get rid or work around it?  \documentclass{standalone} \usepackage{underscore} \usepackage{listings} \usepackage[usenames,dvipsnames, rgb, svgnames, x11names]{xcolor} % Text layout \topmargin 0.0cm \oddsidemargin 0.5cm \evensidemargin 0.5cm \textwidth 16cm \textheight 21cm  \lstnewenvironment{cmd}[1][]{%   \lstset{language=sh, backgroundcolor=\color{LightSteelBlue1}, #1}} {}  \begin{document} \begin{cmd}[caption=Configuration file section including filters] [affy6] [...]     [[hapmap]]     phenofiles = "data/Hapmap6.0/Pheno/hapmappheno_909.csv",     genofile = "/data/snppy/Hapmap6.0/Geno/birdseed-v2.calls.txt"     anno_filter = "chromosome = 5"     idlink_filter = "studyid = 'CEU'"     some_other_stuff = "foo = bar" \end{cmd} \end{document} Is there a such thing as an exchange program in Harry Potter? In the Harry Potter universe, is there any mention of an exchange student at Hogwarts or one of the Hogwarts students going on exchange at another school?  This happens all the time in the "muggle" school systems I'm sure it would happen in the wizarding schools as well.