Hi, HI, SELECT @vCount=('select COUNT(['+@v_COLUMN_NAME+']) from '+@DataTable) print @vCount This is my stored procedure part to find the count of a column specified.But here i m getting a conversion error vCount is declared as int seeism
Hi, HI, SELECT @vCount=('select COUNT(['+@v_COLUMN_NAME+']) from '+@DataTable) print @vCount This is my stored procedure part to find the count of a column specified.But here i m getting a conversion error vCount is declared as int seeism
Got the answer create table #countlists (ICount int) exec ('insert into #countlists(ICount) select COUNT(['+@v_COLUMN_NAME+']) from '+@DataTable+' where '+@v_COLUMN_NAME+' is not null') set @vCount=(select ICount from #countlists) drop table #countlists