Attached is an example of data output from a SQL 2008 R2 view to obtain information entered for notes on patients (VisitID) who discharged. Many times the information is entered into multiple lines. The mutiples lines are designated by the NoteID to be the same entry and the TextSeqID to be the occurrence. What I would like to do is combine the Occurrences into one field up to the maximum of 255 characters. Each separate patient is designated by the VisitID and the length of the text on the line by 'tlen'.
Can this be done?