Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB SQL » View Thread |
Messages 1 to 3 of 3 total |
How to realize this? |
Sun, Aug 15 2010 4:37 AM | Permanent Link |
Uli Becker | I want to compute the quarter of a date and automatically enter this
value in a field. I wrote a function and tried this trigger, assuming that "BeforeUpdate" triggers also with new records: CREATE TRIGGER "EnterQuartal" BEFORE UPDATE ON "Leistungen" BEGIN SET NEWROW.Quartal = GetQuartalFromDate(NEWROW.Datum); END How can I do the same with a *NEW* record? IOW: the user enters a new record with a date and the corresponding quarter should be entered automatically. Thanks Uli |
Sun, Aug 15 2010 5:54 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Uli
What about a BEFORE INSERT trigger or the new ALL type. Haven't used it yet myself but its on my list to convert my existing triggers to this. ALL isn't well documented yet but there is a post about it somewhere in the ng. Sorry but I don't know where Roy Lambert [Team Elevate] |
Sun, Aug 15 2010 8:25 AM | Permanent Link |
Uli Becker | Roy Lambert,
> What about a BEFORE INSERT trigger Thanks for pointing to the right way. I made the old mistake and had in minde that "Before Insert" is fired *BEFORE* the empty record is inserted. Actually it means the same as "OnBeforePost". Works fine now. Regards Uli |
This web page was last updated on Saturday, May 4, 2024 at 12:54 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |