jiblankman
Registered User.
- Local time
- Today, 00:33
- Joined
- May 27, 2008
- Messages
- 43
I have two tables that are the called "Clients" and "Employees". These tables are the result of merging similar tables from three other databases.
The client table has a single entry for each clientid but the employee table can have multiple employees for each clientid. I need to create a table containing all employees from the Employees table who work for a client that has a randompool code of 6. This is the SQL that I am using.
INSERT INTO [Pool] SELECT [Employees].clientid, [Employees].employeeid, [Employees].ename FROM [Employees] INNER JOIN [Clients] ON [Employees].clientid = [Clients].clientid WHERE [Clients].randompool = '6';"
There should be 65 employees in the resulting table, but only 1 appears. Any help would be great, thanks.
The client table has a single entry for each clientid but the employee table can have multiple employees for each clientid. I need to create a table containing all employees from the Employees table who work for a client that has a randompool code of 6. This is the SQL that I am using.
INSERT INTO [Pool] SELECT [Employees].clientid, [Employees].employeeid, [Employees].ename FROM [Employees] INNER JOIN [Clients] ON [Employees].clientid = [Clients].clientid WHERE [Clients].randompool = '6';"
There should be 65 employees in the resulting table, but only 1 appears. Any help would be great, thanks.