I need to delare a cursor within a stored procedure, but do not know the name of some of the tables to be used in the query until run time.
I can get the table names into variables and can build the SQL Select statement into a string as required, however I cannot find out how to declare the cursor to use this string.
Any help would be much appreciated
Thanks
Jon.
I can get the table names into variables and can build the SQL Select statement into a string as required, however I cannot find out how to declare the cursor to use this string.
Any help would be much appreciated
Thanks
Jon.