|
-
Jan 31st, 2011, 01:13 PM
#1
Thread Starter
New Member
how to improve my ways of handling errors than avoiding it?
Let say i insert a record in my database
New Record
CustomerID 1111 --> Inserted Successfully
Next record
CustomerID 2222 --> Duplicated CustomerID --> Should show duplicated.
Right now i am using
IF EXISTS (SELECT ....)
BEGIN
INSERT
(...)
END
BEGIN
UPDATE(....)
END
Any ways to check for duplicated instead of updating it? Any examples?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|