Quantcast
Viewing latest article 1
Browse Latest Browse All 8

Re: Count of lines in dynamic request

iap wrote:

it is passed...
At first, not Cost, and COUNT?
Secondly, did not understand sense of words about different columns - I like told to you;
That NULL and so do not get to result of your request.
And SELECT in which it is caused COUNT, it is logically fulfilled after WHERE

Yes, it is finite Count (*)
Me at last reached
Now all works, all thanks Image may be NSFW.
Clik here to view.
smile

SET @s = ' SET @cn = (SELECT Count (*)
FROM Result
WHERE Id_s = ' + @id_s + ' and ' + COL_NAME (OBJECT_ID (' Result '), @sch) + '> = ' + CAST (@min as varchar) +
' and ' + COL_NAME (OBJECT_ID (' Result '), @sch) + ' <' + CAST (@max as varchar) + ')'
execute sp_executesql @s, N ' @cn int output ', @cn out

Viewing latest article 1
Browse Latest Browse All 8

Trending Articles