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
 SQL Server Development (2000)
 storedprocedure

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2002-04-02 : 09:02:52
raj writes "I update my tables using SP... i passed field value and primary key as parameter to SP...

Example
CREATE Procedure stpSaveJobAddendum
@JobID int,
@AddendumID int,
@Title varchar(100),
@Description varchar(255),
@Document varchar(75),
@CreatedBy varchar(15)

As
Begin

Update JobAddendum Set
Title = @Title,
Description = @Description,
Document = @Document

Where Addendum_ID = @AddendumID
End
GO

here my question

i want update the table... only the values are changed....

example
for Addendum_ID =1 title value is "Test Title"
if i pass @Title is "Test Title"

i don't wnat update the table...

if you know any solution please inform me

thanks,
raj"

Nazim
A custom title

1408 Posts

Posted - 2002-04-02 : 09:06:08
CREATE Procedure stpSaveJobAddendum
@JobID int,
@AddendumID int,
@Title varchar(100),
@Description varchar(255),
@Document varchar(75),
@CreatedBy varchar(15)

As
Begin

Update JobAddendum Set
Title = @Title,
Description = @Description,
Document = @Document

Where Addendum_ID = @AddendumID and title<>@Title
End
GO

HTH

--------------------------------------------------------------
Go to Top of Page
   

- Advertisement -