Oct 19, 2000 #1 AWEinCA Programmer Oct 18, 2000 35 US If I want to loop through a sp_who result set, how would I look at what database a user is logged into? Syntax??? while sp_who Begin if (sp_who.dbname = 'testdb') . . . END [sig][/sig]
If I want to loop through a sp_who result set, how would I look at what database a user is logged into? Syntax??? while sp_who Begin if (sp_who.dbname = 'testdb') . . . END [sig][/sig]
Oct 20, 2000 #2 TomSark MIS Oct 19, 2000 448 US NO, try using insert/exec and insert the results from sp_who into a temp table, then use a cursor to process the results... Tom [sig][/sig] Upvote 0 Downvote
NO, try using insert/exec and insert the results from sp_who into a temp table, then use a cursor to process the results... Tom [sig][/sig]