Excellent idea, Svein!!! Thank you very much.
Walter. 2011/8/15 Svein Erling Tysvær <[email protected]> > ** > > > >Hello everybody > > > >I have a control table, which could to have one row and just one row, > never > >more. > > > >Which trigger I could to write for avoid inserts in that table if there is > >one row on them? > > > >Thanks in advance. > > Very simple Walter. Add a PK field and then have a before insert trigger > that looks something like: > > CREATE TRIGGER WalterTrigger FOR ControlTable ACTIVE BEFORE INSERT OR > UPDATE POSITION 0 AS > begin > new.PK = 1; > end > > HTH, > Set > > > [Non-text portions of this message have been removed] ------------------------------------ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Visit http://www.firebirdsql.org and click the Resources item on the main (top) menu. Try Knowledgebase and FAQ links ! Also search the knowledgebases at http://www.ibphoenix.com ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/firebird-support/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/firebird-support/join (Yahoo! ID required) <*> To change settings via email: [email protected] [email protected] <*> To unsubscribe from this group, send an email to: [email protected] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
