PDA

Click to See Complete Forum and Search --> : SQL code


nmretd
Jan 12th, 2000, 09:27 PM
Can someone show me some SQL code to do the following:

I have 2 tables in Access. They are as follows:

Table 1:

Name StartDate EndDate
---- --------- -------

A 01/01/00 03/01/00
B 01/01/00 03/01/00
C 31/01/00 31/01/00

Table 2:

01/01/00 02/01/00 03/01/00 ....31/01/00
-------- -------- -------- ....--------

There is no data in the aabove fields for Table 2 (yet).

I want the code to select the Name of the person in Table 1 and insert it into the relevant field in Table 2 so that I have something like the following:

01/01/00 02/01/00 03/01/00 ....31/01/00
-------- -------- -------- --------
A A A
B B B
C

A and B appear in the first three fields in Table 2 because in Table 1 their start and end days are 01/01/00 to 03/01/00.

Can someone please show me some code?