Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Remote Views and Oracle problems (VARCHAR2)
Message
De
22/12/1999 15:41:15
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
00306725
Message ID:
00307530
Vues:
27
Oracle8 PL/SQL Programming by Scott Urman published by Osborne-McGraw Hill ISBN 0-07-882305-6


>This is even better than my After Insert trigger. I do lack experience in how to write triggers in Oracle. I have searched several of the major bookstores here for high powered Oracle developer books with an emphasis on PL/SQL. If you have any recommendations, I would sure appreciate a pointing in the right direction. All of my training has been in the Oracle DBA courses and some SQL. The SQL, I have mostly picked up as I go along.
>
>>You could also populate the column using a 'Before Insert' trigger in Oracle:
>>
>>CREATE OR REPLACE TRIGGER SOMETABLE_INSERT
>> BEFORE INSERT ON SOMETABLE FOR EACH ROW
>>
>> DECLARE
>>
>> v_Id Number;
>>
>>
>> BEGIN
>>
>> If :new.id_column Is Null Then
>>
>> Select CompanyFNext Into v_Id from dual;
>> :new.id_column := v_Id;
>> End If;
>>End;
>>
>>To use the trigger mechanism you will have to allow your id column to be nullable so that Oracle wont complain about not having a value when you do the insert.
>>
>>What you may find is that by altering the underlying data structure the other application that interacts with the database may be 'broken'.
>>
>>Mark
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform