This is a somewhat advanced Stored procedure question.

I would like to get a record count by dyamically executing a query, as below:

EXEC('SELECT count(*) AS total_count' + @from_clause + @where_clause)

and I would like to set the results of that count into a local variable in 
the procedure, called @total_count. Does anyone know of a way to do this? I 
am running MS SQL 7.

Thanks!
Avi



--
Avi Flax
Developer, Afternic.com
[EMAIL PROTECTED]
212-798-5484

"Art is the lie that makes us realize truth." - Pablo Picasso


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to