Home » SQL & PL/SQL » SQL & PL/SQL » Manipulating triggers during insert
Manipulating triggers during insert [message #218805] Sat, 10 February 2007 10:18 Go to next message
Messages: 4
Registered: February 2007
Junior Member
I have 2 tables customer_production and customer_backup
Both have identical columns

I have a situation where before a new record insert into customer_production it must check wether the current customers mobileno exists in the customer_production table. If there is a record then i must move it from customer_production to customer_backup therefore i can only have only 1 unique mobileno for customer.
There is a condition where if the new record comes in with registerdate less than current record in customer_production the RECORD MUST GO INTO customer_backup.
Can it be done in a trigger


Re: Manipulating triggers during insert [message #218827 is a reply to message #218805] Sat, 10 February 2007 20:25 Go to previous messageGo to next message
Messages: 25531
Registered: January 2009
Location: SoCal
Senior Member
>Can it be done in a trigger
Yes, if you know what you are doing.
Re: Manipulating triggers during insert [message #218898 is a reply to message #218805] Sun, 11 February 2007 23:23 Go to previous message
Messages: 63
Registered: February 2007
Location: Israel

I normally try to first use messages or comments field with the values I want to insert just to see what the result may be becasue the logic you may be thinking should happens is not always the case with triggers and some operations done in the background are often times confusing to me. Try seeing the results with messages first and then you can get an idea of what the affect may be.
Previous Topic: Count rows before inserting data.
Next Topic: time duration
Goto Forum:

Current Time: Sun Jul 23 18:13:57 CDT 2017

Total time taken to generate the page: 0.13196 seconds