Multiple recordsets

mortendc,

I think one way you can get FSQL to work in this situation is to create nested stored procedures. You can wrap an existing stored procedure with a new stored procedure that combines the record sets. This of course, assumes that the columns in the record sets are the same or of a compatible type. You might have to append a new column to identify from which record set a record originated.

I’ve seen a couple of ways of combining multiple record sets from a stored procedure, one that uses “OS files” (http://www.databasejournal.com/features/mssql/article.php/3386661/How-To-Get-Output-Into-SQL-Server-Table.htm) and another that uses temporary tables (http://blog.joggee.com/?p=24). The latter, in my opinion, is likely to be the better and more resource efficient solution. Here’s another reference that has multiple ways of managing multiple record sets from a stored procedure (http://www.sommarskog.se/share_data.html).