Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.databases.ms-sqlserver > #1835

Re: adding a column to select

From Erland Sommarskog <esquel@sommarskog.se>
Newsgroups comp.databases.ms-sqlserver
Subject Re: adding a column to select
Date 2014-11-03 18:14 +0100
Organization Erland Sommarskog
Message-ID <XnsA3DAB981F3B15Yazorman@127.0.0.1> (permalink)
References <74f6aa18-3f13-4af6-9664-9560eab46eff@googlegroups.com> <XnsA3D899B29DCC0Yazorman@127.0.0.1> <d63803c9-adab-4188-9437-26a1832acaa4@googlegroups.com>

Show all headers | View raw


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

Back to comp.databases.ms-sqlserver | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

adding a column to select Raul Rego <rrego@pmchnnj.org> - 2014-10-31 10:47 -0700
  Re: adding a column to select Erland Sommarskog <esquel@sommarskog.se> - 2014-11-01 15:06 +0100
    Re: adding a column to select Raul Rego <rrego@pmchnnj.org> - 2014-11-03 05:13 -0800
      Re: adding a column to select Erland Sommarskog <esquel@sommarskog.se> - 2014-11-03 18:14 +0100
        Re: adding a column to select Ross Presser <rpresser@gmail.com> - 2014-11-03 09:56 -0800

csiph-web