Auke's code is working fine for me:
DECLARE @MyVar VARCHAR( 3 );
SELECT TOP 1
@MyVar = game_sTeamA
FROM tbl_game
WHERE game_nID = 1
;
SELECT @MyVar
Result:
| (No Column Name)
--+---------------
1 | GER
Mingo.
Richard Cooper wrote:
> Hi Auke,
>
> I think this would have worked but I'm getting a CURSOR error:
>
> 'VARCHAR' is not a recognized CURSOR option.
>
> I've come across this error a few times before and don't really understand it
> and the way to fix it.
>
> Any ideas.
>
> Richard
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:244622
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54