Union All ?

mduda 10 Jul, 2017
Hi Bob and Max.

I have one table that I need to display info from. The challenge is that I have four different columns that need to be union all...

Ex.
Column1: Name
Column2: Address
Column3: Student 1 *
Column4: Student 2 *
Column5: Student 3 *
Column6: Student 4 *

Column7: Teacher 1 **
Column8: Teacher 2 **
Column9: Teacher 3 **
Column10: Teacher 4 **


Student 1 is assigned to Teacher 1. Student 2 is assigned to Teacher 2, and so on.
[list] All students need to be listed in one column, and
All teachers need to be listed in another column.[/list]

So, I believe I'll need to union all, so that the all column data is copied to the next row. Is this possible in CC? I'm currently using cc5, but if it's do-able in cc6, would move to that🙂 Just trying to figure out how to accomplish this in cc. Thanks in advance!
GreyHead 11 Jul, 2017
Hi Mduda,

You may be able to use CONCAT() in the query to read them in list form or you can use the HTML box to construct a new column including all the entries you need.

Bob
mduda 13 Jul, 2017
Hi Bob,

I don't think the concat is going to work ...

I think the only option is to union all. Is this do-able? Thanks!

[attachment=79831_20170713003515_union-all-chrono-png.png][/attachment]
mduda 19 Jul, 2017
Hey Bob - just checking in... is there a way to do a union all in cc? Or do you have any other ideas?

Thanks in advance.
GreyHead 20 Jul, 2017
Hi mduda,

You should be able to do this in CCV5 using the colon : syntax - see the 'Complex query' example in this FAQ

Bob
This topic is locked and no more replies can be posted.