word count a user

1

Please login or register to vote for this query.

(click on this box to dismiss)

Physics

Q&A for active researchers, academics and students of physics

DECLARE @vendor_id int, @vendor_name nvarchar(max),  
    @message varchar(80), @product nvarchar(50);  

DECLARE vendor_cursor CURSOR FOR
SELECT id, Body
FROM posts 
WHERE posts.OwnerUserId = 9872;

OPEN vendor_cursor

FETCH NEXT FROM vendor_cursor   
INTO @vendor_id, @vendor_name

WHILE @@FETCH_STATUS = 0
BEGIN  
    --PRINT ' '
    --SELECT CAST(@vendor_id AS nvarchar(50));
    --SELECT @message = @vendor_id + '--';
    PRINT (2-1)
    FETCH NEXT FROM vendor_cursor
    INTO @vendor_id, @vendor_name 
END

Enter Parameters

Options:
Switch sites:
loading Hold tight while we fetch your results