MySQL Forums
Forum List  »  Triggers

How to Raise Error ?
Posted by: Vishal Patel
Date: November 17, 2005 04:00AM

Hello everyone,

Is there any work around in MySQL to raise error based on Application (Business) Logic?

Consider the following case:

I have two tables a and b. Table ‘a’ have stock transaction data while table ‘b’ have stock balance data. In table ‘a’ each issue and receipt of stock is entered and in table ‘b’ balance after each issue and receipt is stored. Now, before every issue we need to check balance that it should not become negative after current issue. If that case occurs we have to raise the error and stop the transaction being saved in database for table ‘a’.

Hope I have clearly mentioned my point. I’ll appreciate any help in this context.

Thanks in advance.

Regards,
Vishal

Options: ReplyQuote


Subject
Views
Written By
Posted
How to Raise Error ?
22707
November 17, 2005 04:00AM
16063
November 17, 2005 06:58AM
22652
November 19, 2005 08:53AM
13628
February 23, 2006 02:28AM
10196
February 23, 2006 04:42AM
14636
February 24, 2006 08:28AM
7992
February 24, 2006 10:15AM
5842
February 24, 2006 12:42PM
7357
February 27, 2006 08:56AM
6201
February 27, 2006 11:27AM
18252
February 28, 2006 05:22AM
5991
December 20, 2006 03:34AM
3660
November 18, 2008 08:28AM
4257
November 18, 2008 12:45PM
5497
December 19, 2006 11:00AM
4424
December 19, 2006 02:35PM
5653
December 19, 2006 07:53PM
4027
December 20, 2006 03:37AM
4203
December 19, 2006 11:01AM
4960
November 24, 2006 05:32AM
4052
November 24, 2006 07:02AM
3124
December 23, 2008 06:08AM
9798
February 25, 2006 11:48PM
4550
December 19, 2007 04:24AM
3504
December 24, 2008 01:02PM
4268
December 19, 2007 03:59AM
4107
December 19, 2007 05:09AM
3052
November 18, 2008 08:25AM
3444
November 18, 2008 12:49PM
5486
December 19, 2007 04:46AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.