Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 creating a function

Author  Topic 

suman.reddy39
Starting Member

34 Posts

Posted - 2008-07-09 : 08:29:00
dear all,
im new to sql server.please help me in writing a function as i have already wrote one but got some execution errors so could you please help me out in this regards.


Provide a function the following parameters
1. ABC_ID
2. XYZ_123
With these parameters we have to update TABLE002 COLUMN014 where TABLE02 Column001 = 'ABC_ID'
IF I GIVE VALUE INTO COLUMN001 THE COLUMN014 SHOULD BE UPDATED AUTOMATICALLY.

THANKS IN ADVANCE

Don't go the way Life takes you, Take the Life the way you go




SumanReddy.k

jhocutt
Constraint Violating Yak Guru

385 Posts

Posted - 2008-07-09 : 08:53:45
create procedure my_homework (@parm1 varchar(100), @parm2 varchar(100)) as
begin
update TABLE002 set column014 = @parm2 where column001 = @parm1
end
go


"God does not play dice" -- Albert Einstein
"Not only does God play dice, but he sometimes throws them where they cannot be seen."
-- Stephen Hawking
Go to Top of Page

suman.reddy39
Starting Member

34 Posts

Posted - 2008-07-10 : 05:32:27
thanks a lot for your answer it solved my problem..

Don't go the way Life takes you, Take the Life the way you go

subbi
Go to Top of Page

jimf
Master Smack Fu Yak Hacker

2875 Posts

Posted - 2008-07-10 : 08:36:14
That should be a standard naming convention here!

Jim
Go to Top of Page
   

- Advertisement -