hi, I'm trying to update several columns in a row, but am running into problems.
If anyone can help I'd appreciate it... the database is sql2000.
cheers
mark
CREATE PROCEDURE op_CSUpdateCustomer(
@CustomerID int,
@CustomerTitle char(20),
@CustomerFirstName char(40),
@CustomerLastName char(40),
@CustomerInitials char(10),
@CustomerDOB char(40),
@SourceID int,
@Notes varchar(255),
@DateCreated datetime
)
AS
UPDATE tbl_Customers(
CustomerTitle
,CustomerFirstName
,CustomerLastName
,CustomerInitials
,CustomerDOB
,SourceID
,CustomerNotes
,DateCreated
)
VALUES(
@CustomerTitle
,@CustomerFirstName
,@CustomerLastName
,@CustomerInitials
,@CustomerDOB
,@SourceID
,@Notes
,@DateCreated
)
WHERE CustomerID = @CustomerID
GO
If anyone can help I'd appreciate it... the database is sql2000.
cheers
mark
CREATE PROCEDURE op_CSUpdateCustomer(
@CustomerID int,
@CustomerTitle char(20),
@CustomerFirstName char(40),
@CustomerLastName char(40),
@CustomerInitials char(10),
@CustomerDOB char(40),
@SourceID int,
@Notes varchar(255),
@DateCreated datetime
)
AS
UPDATE tbl_Customers(
CustomerTitle
,CustomerFirstName
,CustomerLastName
,CustomerInitials
,CustomerDOB
,SourceID
,CustomerNotes
,DateCreated
)
VALUES(
@CustomerTitle
,@CustomerFirstName
,@CustomerLastName
,@CustomerInitials
,@CustomerDOB
,@SourceID
,@Notes
,@DateCreated
)
WHERE CustomerID = @CustomerID
GO