Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: Erland Sommarskog Newsgroups: comp.databases.ms-sqlserver Subject: Re: adding a column to select Date: Mon, 03 Nov 2014 18:14:10 +0100 Organization: Erland Sommarskog Lines: 23 Message-ID: References: <74f6aa18-3f13-4af6-9664-9560eab46eff@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Injection-Info: mx02.eternal-september.org; posting-host="370152b05827583d7f88db047866aa4b"; logging-data="10063"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19OFLIXPzcEZz0L3H9ZizZ/" User-Agent: Xnews/2006.08.24 Mime-proxy/2.1.c.0 (Win32) Cancel-Lock: sha1:K6FsSFHAMGUyLb8DwTSI583tqmI= Xref: csiph.com comp.databases.ms-sqlserver:1835 Raul Rego (rrego@pmchnnj.org) writes: > Erland. yes I gues I will like all NOTE column values for case > casenumber concatenated. > > example, for casenumber=1079155 we have many notes entered by date/time > and I will like it to display in one single place as such > --- Tue Apr 16, 2013 @ 15:00 By 679:asheu --- > Dr. Duroche Calling from Community ER > I sincerely hope that you did not post actual patient data in a public forum! I don't have the time to type of any an exacmple, but this Simple Talk article discusses a couple of techniques: https://www.simple-talk.com/sql/t-sql-programming/concatenating-row-values-in-transact-sql/ -- Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se Links for SQL Server Books Online: SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx