how to loop over results of a select statement ?
-
I have a select query that returns a some rows . i want to send each of the rows in returned result to a function but i do not know how ? can you help me
select PersonelCode , ...
from PersonnelTable
and the function Need the PersonelCode.For each row this function should be executed
Create Function MyFunction ( @PersonelCode )
begin
body of the function
end -
I have a select query that returns a some rows . i want to send each of the rows in returned result to a function but i do not know how ? can you help me
select PersonelCode , ...
from PersonnelTable
and the function Need the PersonelCode.For each row this function should be executed
Create Function MyFunction ( @PersonelCode )
begin
body of the function
end -
I have a select query that returns a some rows . i want to send each of the rows in returned result to a function but i do not know how ? can you help me
select PersonelCode , ...
from PersonnelTable
and the function Need the PersonelCode.For each row this function should be executed
Create Function MyFunction ( @PersonelCode )
begin
body of the function
endHow about
SELECT PersonelCode ,MyFunction(PersonelCode), ... FROM PersonnelTable