Hello Experts,
I am trying to pass a tablename into a function and return the rowcount for the given table.
I made it Sybase using a string variable and a cursor. Is there a simular way to build a string, then use the string as the SQL statment for a cursor?
my_sql := 'SELECT COUNT(*) FROM ' + my_tablename + ';';
Is there any way to send my_sql to the cursor? Or is the a better way?
Any suggestions are most welcome!
Best Regards,
Gunnar
I am trying to pass a tablename into a function and return the rowcount for the given table.
I made it Sybase using a string variable and a cursor. Is there a simular way to build a string, then use the string as the SQL statment for a cursor?
my_sql := 'SELECT COUNT(*) FROM ' + my_tablename + ';';
Is there any way to send my_sql to the cursor? Or is the a better way?
Any suggestions are most welcome!
Best Regards,
Gunnar