I need to make one record, out of multiple records based on a key code. Here's a sample:
mytable
CODE NAME1 ADDRESS1 CITYSTZIP1
001 Mike 1234 Main Anytown,US 99999
001 John 1234 Street AnyWhere,CA 12343
001 Dan 1234 First Mytown,UT, 22222
003 Steve 999 Main Mytown,UT,21111
003 Don 111 Second Mytown,US 22222
newTable
001 Mike 1234 Main Anytown,US 99999 John 1234 Street Anywhere,CA 12343 Dan 1234 First Mytown,UT,22222
003 Steve 999 Main Mytown,UT 21111 Don 111 Second Mytown,US 22222
I'm thinking some kind of self join based on the code field, but I have never done self join or multiple nested joins. Any help would be much appreciated!!
mytable
CODE NAME1 ADDRESS1 CITYSTZIP1
001 Mike 1234 Main Anytown,US 99999
001 John 1234 Street AnyWhere,CA 12343
001 Dan 1234 First Mytown,UT, 22222
003 Steve 999 Main Mytown,UT,21111
003 Don 111 Second Mytown,US 22222
newTable
001 Mike 1234 Main Anytown,US 99999 John 1234 Street Anywhere,CA 12343 Dan 1234 First Mytown,UT,22222
003 Steve 999 Main Mytown,UT 21111 Don 111 Second Mytown,US 22222
I'm thinking some kind of self join based on the code field, but I have never done self join or multiple nested joins. Any help would be much appreciated!!