Hello Experts,
I am trying to make a function to get the rowcount of a table, where the table name is the argument into the function.
SELECT @SQLSENT = 'SELECT COUNT(*) FROM ' + @AS_TABLENAME + ';'
EXECUTE sp_executesql @SQLSENT, N'@LL_COUNT INTEGER OUTPUT', @LL_COUNT OUTPUT
RETURN...
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 '...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.