sr3243 Tracker
https://communities.sas.com/kntur85557/tracker
sr3243 TrackerTue, 23 Jul 2024 23:21:36 GMT2024-07-23T23:21:36ZRe: How to concatenate multiple rows into one row by ID number
https://communities.sas.com/t5/SAS-Programming/How-to-concatenate-multiple-rows-into-one-row-by-ID-number/m-p/285263#M58276
<P>This was exactly what I needed! Thanks!</P>Mon, 18 Jul 2016 15:51:12 GMThttps://communities.sas.com/t5/SAS-Programming/How-to-concatenate-multiple-rows-into-one-row-by-ID-number/m-p/285263#M58276sr32432016-07-18T15:51:12ZRe: How to concatenate multiple rows into one row by ID number
https://communities.sas.com/t5/SAS-Programming/How-to-concatenate-multiple-rows-into-one-row-by-ID-number/m-p/285211#M58259
<P>I have ~2000 unique IDs and a few thousand rows, so I do need a program to avoid mistakes with manually cutting/pasting observations.</P><P> </P><P>Thanks</P>Mon, 18 Jul 2016 12:45:01 GMThttps://communities.sas.com/t5/SAS-Programming/How-to-concatenate-multiple-rows-into-one-row-by-ID-number/m-p/285211#M58259sr32432016-07-18T12:45:01ZHow to concatenate multiple rows into one row by ID number
https://communities.sas.com/t5/SAS-Programming/How-to-concatenate-multiple-rows-into-one-row-by-ID-number/m-p/285107#M58221
<P>I want to combine rows with the same ID from a "long" data set into a "wide" data set based on common ID numbers. File is currently in excel format. Some IDs may have only 1 row, but others have up to 30 rows. There are 5 variables per row (including the ID number).</P><P>Thanks!</P><P> </P><P>Data have:</P><TABLE><TBODY><TR><TD>ID</TD><TD>Num</TD><TD>Date</TD><TD>Result</TD><TD>Type</TD></TR><TR><TD>1</TD><TD>1</TD><TD>1/1/2013</TD><TD>words</TD><TD>1</TD></TR><TR><TD>2</TD><TD>10</TD><TD>1/10/2013</TD><TD>words</TD><TD>3</TD></TR><TR><TD>2</TD><TD>2</TD><TD>6/1/2014</TD><TD>words</TD><TD>4</TD></TR><TR><TD>2</TD><TD>5</TD><TD>7/1/2015</TD><TD>words</TD><TD>2</TD></TR><TR><TD>3</TD><TD>23</TD><TD>3/1/2014</TD><TD>words</TD><TD>1</TD></TR><TR><TD>3</TD><TD>4</TD><TD>6/2/2015</TD><TD>words</TD><TD>2</TD></TR><TR><TD>4</TD><TD>2</TD><TD>4/1/2013</TD><TD>words</TD><TD>1</TD></TR></TBODY></TABLE><P> </P><P>Data want (with var going up to Num30, Date30, Result30, Type30)</P><TABLE><TBODY><TR><TD>ID</TD><TD>Num1</TD><TD>Date1</TD><TD>Result1</TD><TD>Type1</TD><TD>Num2</TD><TD>Date2</TD><TD>Result2</TD><TD>Type2</TD><TD>Num3</TD><TD>Date3</TD><TD>Result3</TD><TD>Type3</TD></TR><TR><TD>1</TD><TD>1</TD><TD>1/1/2013</TD><TD>words</TD><TD>1</TD><TD> </TD><TD> </TD><TD> </TD><TD> </TD><TD> </TD><TD> </TD><TD> </TD><TD> </TD></TR><TR><TD>2</TD><TD>10</TD><TD>1/10/2013</TD><TD>words</TD><TD>3</TD><TD>2</TD><TD>6/1/2014</TD><TD>words</TD><TD>4</TD><TD>5</TD><TD>7/1/2015</TD><TD>words</TD><TD>2</TD></TR><TR><TD>3</TD><TD>23</TD><TD>3/1/2014</TD><TD>words</TD><TD>1</TD><TD>4</TD><TD>6/2/2015</TD><TD>words</TD><TD>2</TD><TD> </TD><TD> </TD><TD> </TD><TD> </TD></TR><TR><TD>4</TD><TD>2</TD><TD>4/1/2013</TD><TD>words</TD><TD>1</TD><TD> </TD><TD> </TD><TD> </TD><TD> </TD><TD> </TD><TD> </TD><TD> </TD><TD> </TD></TR></TBODY></TABLE><P> </P>Sun, 17 Jul 2016 17:35:46 GMThttps://communities.sas.com/t5/SAS-Programming/How-to-concatenate-multiple-rows-into-one-row-by-ID-number/m-p/285107#M58221sr32432016-07-17T17:35:46Z