This is a discussion on pass int variable in a sql statement within the Sybase forums, part of the Database Server Software category; --> Hi, I am writing a stored proc, which gets the row counts of various tables. The table names are ...
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Hi, I am writing a stored proc, which gets the row counts of various tables. The table names are genereated for a table, TableNames. So I am using somethin like, select @tableName = tableName from TableNames select @sql = "select count(*) from " + @tableName exec(sql) I want to keep track of the count i get back from executing this sql. How would store this data in a variable? Thanks, Help much appreciated. |