Query results in duplicate

W

Wouter

Hi to all,

I have a Table with shift info like:

<pre>
SftCode SftNumber
Early1 2
Early2 3
Mid1 2
Mid2 2
Late1 1
</pre>

I would like to have a query that result in:
<pre>
SftCode
Early1
Early1
Early2
Early2
Early2
Mid1
Mid1
Mid2
Mid2
Late1
</pre>

The result of this wanted query will be use in another query to combine
the results with a table of employees and the assigned shifts.
This table comes from another application which has no report functions nor
an option to test on number of staff per shift (To much / to little)

<pre>
EmpCode EmpShift
129021 Early1
157454 Mid1
305514 Mid2
413017 Early1
424798 Early2
484423 Early1
501243 Late1
902370 Mid1
987288 Mid2
994487 Early2
</pre>

The result of the second query will be:
<pre>
qry2shift qry2Emp qry2Remark
Early1 129021
Early1 413017
Early1 484423 EXTRA
Early2 424798
Early2 997487
Early2 MISSING
Mid1 157454
Mid1 902370
Mid2 305514
Mid2 987288
Late1 501243
</pre>

This result will be used to create a report.

Any ideas?

Thanks in advance
 
Top