Loop through records
- From: Michael <Michael@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 7 May 2008 19:56:00 -0700
Hello,
i have a table that has some informatio regarding an office building in it.
It also has the building managers information in it. I want to create two
new tables. One with just the building info, and one with just the managers
info. Now, I have created the two new tables. In the building table, I have
one column that has the ManagerID. So I have written a query that imports
all the building info into the new table. Here is my question. How can I
insert (one at a time I guess) the Managers into their new table while
updating the new ManagerID into the buildings table? If i was doing this
through something like C# I would just insert one row at a time, get the new
ID, the update the second table. But I do now know how to build that type of
look in SQL. Can someone help me?
Thanks,
Michael
.
- Follow-Ups:
- Re: Loop through records
- From: Hugo Kornelis
- Re: Loop through records
- Prev by Date: Re: Data Prompt
- Next by Date: Extracting the table names to which a fied is related to
- Previous by thread: Re: Data Prompt
- Next by thread: Re: Loop through records
- Index(es):