Thread: need help
01-05-05, 09:29 #1Registered User
- Join Date
- Sep 2004
Unanswered: need help
im new to sql... what i'm trying to do is catch the error on insert or update statment of sql.. sound simple but please..
this is the sample table design...
CustomerID int(4) Primary AutoIncrement
what i'm trying to do is when a record is deleted, it's not actually deleted
in the table but only marked 1 (true) the Deleted field.. because i don't want
to lose the relationship...
it's easy to do this on insert statement like this..
Create Procedure InsertCustomer(@param1 ....) AS
IF NOT EXIST (SELECT * FROM tbl_Customer WHERE DELETED = 0) THEN
// do insert statement here