combining separate columns into one column in a query

J

John MilburySteen

I have a table used in scheduling classes, set up like this:

ClassID CLass Day 1 Time1 Day2 Time2
34566 Biology MTRF 11:30
34567 Chemistry MT 11:30 RF 11:15



In a query, how do I "append" Day2 to Day1 and Time2 to Time1 to get a
dynaset that looks like this:



Biology MTRF 11:30
Chemistry MT 11:30
Chemistry RF 11:15


Please do not ask me to redo my tables, nor use any VBA programming.
 
J

Jeff Boyce

John

Care to impose any other constraints on what we might consider prudent or
preferable...<g>?

How 'bout something like:

SELECT Class, Day1, Time1
FROM YourTable
UNION
SELECT Class, Day2, Time2
FROM YourTable;

Given your data structure, this "normalizing" query provides a work-around
for poorly-normalized data.

Regards

Jeff Boyce
Microsoft Office/Access MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top