May 21, 2004 at 4:39 am
I have the following procedure. When i execute it it's giving me syntax error near '='. When I remove @count it works. So what's wrong with the syntax like this and how to solve it?? create PROCEDURE [dbo].[USP_GetFileCount] @tableName nvarchar(50),@colName nvarchar(50), @recordID int, @count int output AS exec( 'select ' + @count + ' = count(*) from '+ @tableName + 'where ' + @colName + ' = ' + @recordID) |
May 21, 2004 at 4:58 am
You have to convert @Count to VARCHAR or CHAR
--Jeff Moden
Change is inevitable... Change for the better is not.
May 21, 2004 at 6:01 am
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply