I had thought about that, but here was the problem..My client wanted a crazy layout for the returned rows. YOu have probably seen my posts about this before. What I ended up doing was this...I select all the common rows that are part of the query. Thendo a lookup via a cursor to add in a related bit of data that MAY or MAY NOT exist. Then I do a SELET * FROM #Test which is the name of the temp table. So, I can't list out of columns on the front end, because I do not know which ones will actually be there. That cursor could generate one extra column or ten extra columns. I don't know. Thanks for the adviceSELECT r.Guid as RegistrationID,a.Guid as AthleteID,CASE WHEN r.WaiverInitials = '' THEN '.us' ELSE '.com' END AS SiteReg,re.RegEvtKey as RegEvtKey,a.AthKey as AthKey,a.Firstname as FName,a.LastName as LName,Convert(varchar(10),a.DateOfBirth, 101) as DOB,a.Gender as Sex,a.Address1 as Addr,a.City,a.[State] as ST,a.Zip,a.MedicalConditions as Medical,a.Email,a.DayPhone,a.EveningPhone,re.USATNumber,re.TShirtSize,re.Division as Div, CASE r.PaperRegistration WHEN 1 THEN 'Paper' ELSE CASE r.PayByCheck WHEN 1 THEN 'Check' ELSE 'CC' END END as Paytype,e.Name as [Event],IsNull(re.Fee,e.Fee) as EntryFee,r.OnlineFee,TotalFee,Convert(varchar(10),r.Date, 101) as RegDate,IsNull(rd.TotalDiscount,0.00) as TotalDiscount/*, LEFT(q.questions, LEN(q.questions)-4) as questions, LEFT(_af.fees, LEN(_af.fees)-4) as extras, LEFT(_uf.usat, LEN(_uf.usat)-4) as usat, LEFT(_rl.relay, LEN(_rl.relay)-4) as relays*/Into #TestFROM Registration rINNER JOIN RegistrationEvent re ON re.RegistrationGuid = r.GuidINNER JOIN [Event] e ON e.Guid = re.EventGuidINNER JOIN Athlete a ON a.AccountGuid = r.AccountGuid AND a.Guid = re.AthleteGuidLEFT JOIN RegistrationDiscount rd ON rd.RegistrationGuid = r.GuidWHERE TotalFee >0 AND r.IsPaid = 1--AND r.WaiverInitials<>''AND r.RaceGuid=@RaceGuidORDER BY RegistrationID, AthleteID, LNameENDDECLARE @SQL nvarchar(500)DECLARE @AddFeeGuid uniqueidentifierDECLARE @Name varchar(100)DECLARE @Qty varchar(100)DECLARE @Fee varchar(100)--DECLARE @SQL nvarchar(500)DECLARE my_cursor CURSOR FORSELECT Guid, Name, FeeFROM AdditionalFee WHERE RaceGuid=@RaceGuidORDER BY DisplayOrder, NameOPEN my_cursorFETCH NEXT FROM my_cursorINTO @AddFeeGuid,@Name,@FeeWHILE @@FETCH_STATUS = 0BEGIN SET @SQL = 'ALTER Table #test ADD [' + @Name + '] nvarchar(300) ' EXEC(@SQL) SET @SQL = 'ALTER Table #test ADD [' + @Name + '_' + @Fee + '] nvarchar(300) ' EXEC(@SQL) SET @SQL = 'UPDATE #Test SET [' + @Name + '] = cast(ra.Qty as nvarchar(10)) ' + ' ,[' + @Name + '_' + @Fee + '] = cast(ra.Fee as nvarchar(10)) ' + ' FROM #Test ' + ' INNER JOIN RegistrationAdditionalFee as ra ON ra.RegistrationGuid=RegistrationID ' + ' AND ''' + cast(@AddFeeGuid as nvarchar(100)) + '''= ra.AdditionalFeeGuid' PRINT @SQL EXEC(@SQL) FETCH NEXT FROM my_cursor INTO @AddFeeGuid,@Name,@FeeENDCLOSE my_cursorDEALLOCATE my_cursorSELET * FROM #Test