I'm looking to show on 1 line my clients name and all of their check dates for the month of January in 2014. Some clients may have 5 check dates in the month while other may only have 1 or 3. Is there a way to make this happen? Using this SQL query:
SELECT CC.co, checkDate FROM CCalendar CC
INNER JOIN CInfo CI on CC.co = CI.co
WHERE checkDate BETWEEN '01/01/2014' AND '01/31/2014'
AND CI.endDate IS NULL AND CI.status IN ('LIVE', 'CONVERSION')
The results currently look like this:
co | checkDate
---+------------
co | 01/03/2014
co | 01/14/2014
co | 01/17/2014
co | 01/24/2014
co | 01/24/2014
and what I want it to look like is this
Co | checkdate1| checkdate2| checkdate3| checkdate4| checkdate5|
co | 01/03/2014| 01/14/2014| 01/17/2014| 01/24/2014| 01/24/2014|