I have several tables that are linked together by a common value and want to create a stored procedure that will perform a query and then go through each of the returned results one at a time and perform some functions.
My problem is that I do not know how to set up a stored procedure so that it will loop through the results one at a time. Usually SQL statements in stored procedures only return the last result of the query.
How do I loop through them all? I assume there is a loop function that has been evading my eyes, dammit it must be found. [sig][/sig]
My problem is that I do not know how to set up a stored procedure so that it will loop through the results one at a time. Usually SQL statements in stored procedures only return the last result of the query.
How do I loop through them all? I assume there is a loop function that has been evading my eyes, dammit it must be found. [sig][/sig]