Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: Naranek
  • Content: Threads
  • Order by date
  1. Naranek

    Dynamic sql in functions

    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...
  2. Naranek

    Dynamic tablename in function

    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 '...

Part and Inventory Search

Back
Top