|
Posted by CK on 10/25/06 15:52
Thanks Roy!
I used this and it worked as well
INSERT INTO BudgetAssistant (BudgetID, EmployeeID)
SELECT * FROM (
SELECT BudgetID, EmployeeID FROM Budget, (
SELECT EmployeeID FROM TeamMember WHERE TeamID=96) A)tmp
"Roy Harvey" <roy_harvey@snet.net> wrote in message
news:mb6tj212ahvgci94m8m4a1nfo0vg361jre@4ax.com...
> This might give you some ideas.
>
> INSERT budgetAssistant (budgetID, employee)
> SELECT B.budgetID, Add3.employee
> FROM budgeting as B CROSS JOIN
> (select 123 as employee UNION ALL
> select 345 UNION ALL
> select 567) AS Add3
>
> Roy Harvey
> Beacon Falls, CT
>
> On Tue, 24 Oct 2006 19:53:31 GMT, "CK" <c_kettenbach@hotmail.com>
> wrote:
>
>>Hi All,
>>
>>We have a budgeting table and a budgetAssistant table, I have 3 employee
>>ID's,
>>I need to assign each of them as budget assistant. Do you know of a quick
>>update query I could write to accomplish this? The budget and
>>budgetAssistant tables both have a budgetID field. Any ideas?
>>
>> I wanted to select those employees, then select all the budget then loop
>>through and add those 3 to each budget as a budgetAssistant.
>>
>>Thanks,
>>
>>~CK
>>
Navigation:
[Reply to this message]
|