How do I combine the comments based on each unique Tag_ID and code_page?
It is sorted by timestamp and hence code_page. I need to combine the comments for code_page 1 and those comments with NULL code_page below it ( until Code_page is changed to 2) as one text field . Then combine comments for Code 2 and all comments with NULL Code_page after/below it. THANK YOU!
Tag_ID | code_page | timestamp | Comment |
N123 | 1 | 3/13/2014 13:54:38 | textual comment |
N123 | 1 | 3/13/2014 18:00:12 | textual comment |
N123 | NULL | 3/13/2014 18:00:14 | textual comment |
N123 | NULL | 3/13/2014 18:00:15 | textual comment |
N123 | NULL | 3/13/2014 18:01:31 | textual comment |
N123 | NULL | 3/13/2014 19:55:58 | textual comment |
N123 | NULL | 3/13/2014 19:56:00 | textual comment |
N123 | NULL | 3/13/2014 19:56:13 | textual comment |
N123 | NULL | 3/13/2014 20:26:20 | textual comment |
N123 | NULL | 3/13/2014 20:26:22 | textual comment |
N123 | 2 | 3/13/2014 12:45:04 | textual comment |
N123 | NULL | 3/13/2014 12:45:20 | textual comment |
N123 | NULL | 3/13/2014 20:26:33 | textual comment |
N123 | NULL | 3/13/2014 20:26:34 | textual comment |
When done it will look something like this:
N123 | 1 | textual comment // textual comment // textual comment // textual comment // textual comment // textual comment // textual comment // textual comment // textual comment // textual comment // |
N123 | 2 | textual comment // textual comment // textual comment // textual comment // |