how to insert this return

  • Thread starter Thread starter alecarnero
  • Start date Start date
A

alecarnero

I have this store procedure

create proc userNT as
-- declaramos las variables
declare @name varchar(30), @lenindex int, @lenall int, @nomeuser varchar(10)
-- devuelve el nombre de usuario que entro
select @name= suser_sname()
select @lenall = len(@name)
select @lenindex = CHARINDEX('\',@name)
-- limpiamos las variables y tenemos el nombre
select substring (@name, @lenindex+1,@lenall-@lenindex) as ntusername
return

this SP returns the actual NTuser,

but how i can write this return in a table???? or in a textbox

Thanks in advance
 
I thinnk the best way for make this is :


ALTER procedure "operador" as
insert control (usuario)
exec ('select suser_sname(0x01)')
 
Back
Top