dbTalk Databases Forums  

Update same row in DTS

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Update same row in DTS in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Monu
 
Posts: n/a

Default Update same row in DTS - 07-11-2006 , 12:59 PM






I am new to DTS. I have one table which has password column in it. I
would like to create the password from username.I one function which
depends on the value of username. The return value of this function
should be the password.

I would appreciate if anybody can help me out finding the DTS solution.
It needs to be DTS because I have to do the same task often.


Reply With Quote
  #2  
Old   
Davide
 
Posts: n/a

Default Re: Update same row in DTS - 07-12-2006 , 02:26 AM






Hello Monu,

Quote:
I am new to DTS. I have one table which has password column in it. I
would like to create the password from username.I one function which
depends on the value of username. The return value of this function
should be the password.

I would appreciate if anybody can help me out finding the DTS
solution. It needs to be DTS because I have to do the same task often.

If i had permissions I would implement a user defined function on my DataBase:

CREATE FUNCTION dbo.GeneratePwd
(
@user varchar(255)
)
RETURNS varchar(255)
AS
BEGIN
....
....
....

END



the in a DTS use an 'Execute SQL Task' to execute the statement:

UPDATE MyTable SET MyTable.Password = dbo.GeneratePwd (MyTable.User)





Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.