how to insert this return

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
 
A

alecarnero

I thinnk the best way for make this is :


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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top