Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 finding number of records using store procedure

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2002-04-21 : 22:28:05
omkar writes "i was trying to find number records in table, by passing table to
procedure,it works fine if i use temporary table and store count in it
but it gives error if i try to execute foll. code

declare @k int
select @StrExec=' Select @k=count(*) from ' + @TableNm
exec(@StrExec)
select @k"

Nazim
A custom title

1408 Posts

Posted - 2002-04-22 : 00:49:46
you havent declared all the variables you are using.

Check this http://www.sqlteam.com/Forums/topic.asp?TOPIC_ID=14763

--------------------------------------------------------------


Edited by - Nazim on 04/22/2002 00:53:16
Go to Top of Page
   

- Advertisement -