I got this to work by putting in a stored procedure; though may examples show a cursor within a stored procedure, nowhere does it say it needs to be between a block, not even within a stored procedure, directly from a sql statement(s). I don't even know about the command window. My stupid maybe, but background and training says never assume anything, that a curser must be within a begin end block, or procedure (if that is even true). Whatever...
Michael Ayres
Senior Technical Project Manager
Cyber Security Coordination Center
Michael Ayres, MS, PMP, ACP, CISSP
University of California Office of the President (contractor)
1111 Franklin Street #7109 Oakland, Ca.94607
Michael.Ayres@ucop.edu | (510) 987-9459 | (415) 999-2049 Mobile