Arthur Fuller
artful at rogers.com
Wed Jul 7 18:33:33 CDT 2004
You could also rewrite the sproc as a table UDF, which might be a little cleaner. Just a matter of opinion, I suppose. Arthur -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Billy Pang Sent: Tuesday, July 06, 2004 9:32 PM To: dba-sqlserver at databaseadvisors.com Subject: RE: [dba-SQLServer] Finding current login group perhaps sql server thinks that xp_logininfo is a table in the select statement quoted in your email. if you want to store results from sproc, create a temp table and then put sproc after the insert statement.. using the sp_who as an example... /* cut here */ CREATE TABLE #TT ( spid varchar(100), ecid varchar(100),status varchar(100), loginame varchar(100), hostname varchar(100), blk varchar(100),dbname varchar(100), cmd varchar(100) ) go insert into #TT EXEC sp_who go select spid from #tt go DROP TABLE #TT go /* cut here */ >From: David Emerson <davide at dalyn.co.nz> >Reply-To: dba-sqlserver at databaseadvisors.com >To: dba-sqlserver at databaseadvisors.com >Subject: RE: [dba-SQLServer] Finding current login group >Date: Wed, 07 Jul 2004 09:58:49 +1200 > >Francis, > >That is my intention but how do I get the recordset from the sproc. >The >following doesn't work - > >SELECT Permission_Path FROM master..xp_logininfo > >Error message is "Invalid object name 'master..xp_logininfo'." > >David > >At 6/07/2004, you wrote: >>David, >> >>Anything wrong with the normal method of creating a temporary table to >>hold the stored procedure results and then selecting what you want? >> >>Francis R Harvey III >>WB 303, (301)294-3952 >>harveyf1 at westat.com >> >> >> > -----Original Message----- >> > From: dba-sqlserver-bounces at databaseadvisors.com >> > [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of >> > David Emerson >> > Sent: Tuesday, July 06, 2004 12:59 PM >> > To: dba-sqlserver at databaseadvisors.com >> > Subject: RE: [dba-SQLServer] Finding current login group >> > >><snip> >> > Now, how do I >> > change the sproc so that it returns the value of the permission >> > path column? >> > >> > David >><snip> >>_______________________________________________ >>dba-SQLServer mailing list >>dba-SQLServer at databaseadvisors.com >>http://databaseadvisors.com/mailman/listinfo/dba-sqlserver >>http://www.databaseadvisors.com >_______________________________________________ >dba-SQLServer mailing list >dba-SQLServer at databaseadvisors.com >http://databaseadvisors.com/mailman/listinfo/dba-sqlserver >http://www.databaseadvisors.com > _________________________________________________________________ Tired of spam? Get advanced junk mail protection with MSN Premium http://join.msn.com/?pgmarket=en-ca&page=byoa/prem&xAPID=1994&DI=1034&SU =http://hotmail.com/enca&HL=Market_MSNIS_Taglines _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com