The problem is that it is almost 200 tables, and they are stored in a TableInfo table. I must use a 3rd party tool to present the values, but due to limitations in that software I must make all the functions in the database itself. The software has no way of doing this. It is not a programming...
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.