Question : Split specific Cross tab table rows based on criteria - keeping all other column data intact.

I have some SQL that works great in producing the Cross Tab table I need.

However, one field (EveryGiftExport.Email) has some values where there are multiple emails separated by a comma. Basically this field was concatenated in another query to simply other requirements for other purposes.
1:
2:
3:
4:
5:
6:
TRANSFORM Sum(EveryGiftExport.Amount) AS SumOfAmount
SELECT EveryGiftExport.FileAs, EveryGiftExport.Email, EveryGiftExport.Address
FROM EveryGiftExport
WHERE (((EveryGiftExport.GiftDate) Between DateSerial(Year(Date()),Month(Date())-24,1) And Date()))
GROUP BY EveryGiftExport.FileAs, EveryGiftExport.Email, EveryGiftExport.Address
PIVOT Format([GiftDate],"yyyy-mm");


Is there a way to split "EveryGiftExport.Email" if it has a comma into the next row keeping every other column intact (even if "EveryGiftExport.Email" has 3 email address OR no email addresses)?

Should I use a Subquery?  I really have no idea where to start.

Answer : Split specific Cross tab table rows based on criteria - keeping all other column data intact.

Anyway, the command proposed in http:#a33329967
will produce
Mon Jun 28 23:30:02 2010 '/ngnprod/archive/ngnprod_75018.arc'
Mon Jun 28 23:40:44 2010 '/ngnprod/archive/ngnprod_75019.arc'
Tue Jun 29 00:04:24 2010 '/ngnprod/archive/ngnprod_75021.arc'
Tue Jun 29 23:52:32 2010 '/ngnprod/archive/ngnprod_75206.arc'
Wed Jun 30 23:52:01 2010 '/ngnprod/archive/ngnprod_75391.arc'
Thu Jul  1 00:02:13 2010 '/ngnprod/archive/ngnprod_75392.arc'
Thu Jul  1 23:51:42 2010 '/ngnprod/archive/ngnprod_75553.arc'
Fri Jul  2 00:04:03 2010 '/ngnprod/archive/ngnprod_75554.arc'
Fri Jul  2 00:16:44 2010 '/ngnprod/archive/ngnprod_75555.arc'
Fri Jul  2 23:55:46 2010 '/ngnprod/archive/ngnprod_75721.arc'
Sat Jul  3 00:09:09 2010 '/ngnprod/archive/ngnprod_75722.arc'
Sat Jul  3 23:51:51 2010 '/ngnprod/archive/ngnprod_75888.arc'
Sun Jul  4 00:02:09 2010 '/ngnprod/archive/ngnprod_75889.arc'
when run on newalert.log.
Does that satisfy your requirements?
Random Solutions  
 
programming4us programming4us