I am trying to write a stored procedure that utilizes something like a
while in ASP.
my select statement is like this.
s = select distinct(employ ee_id) from employee_table
rs.Open s
while not rs.EOF
then I want to use employee_id in about twenty different sql
statements. They are all different and they utilize multiple joins. I
use four - six different tables to find out a count in the sql
statement. Then I want to use the value from each of the sql
statements at the end to use in an insert statement. What would be the
best way.
insert into table (employee_id, value, value, etc..)
if not rs.EOF then
rs.MoveNext
end if
wend
Any help would be appreciated.
while in ASP.
my select statement is like this.
s = select distinct(employ ee_id) from employee_table
rs.Open s
while not rs.EOF
then I want to use employee_id in about twenty different sql
statements. They are all different and they utilize multiple joins. I
use four - six different tables to find out a count in the sql
statement. Then I want to use the value from each of the sql
statements at the end to use in an insert statement. What would be the
best way.
insert into table (employee_id, value, value, etc..)
if not rs.EOF then
rs.MoveNext
end if
wend
Any help would be appreciated.
Comment