Re: y2k
Posted in 1997
On Mon, 24 Nov 1997 18:40:28 GMT, Nils.Myklebust@idg.no (Nils Myklebust) wrote: >The answer is very simple: >1. You cant use triggers and stored procedures to update any column of >the same table that fired the trigger. This is not 100% correct. You cannot update the field in the table that triggered the event. If you have fields a,b,c,d and you make the trigger on update of a,b,c then you can update d. But your update statement can never update d, then you will get an error. > >2. You simply don't use 2 digit years - ever - for any reason. You >catch this at an earlier time and make sure that anything that arrives >at the database has 4 digits for the year. > >3. If at all possible you use the mdy function to creat date values so >you don't get problems relative to the date format (you might want to >change DBDATE at some point in time or in a new installation). The mdy >function obviously requires 4 digit years. > > >yichen@hermes.cs.uh.edu (Yi Chen ) wrote: > >: >:Is it possible to using triggers and stored procedures to modify date field >:automatically when rows are inserted or updated. >: >:For examples >:create table xxx ( xxx date); >:when insert into xxx values("11/11/01"), what I need is "11/11/2001". >:when insert into xxx values("11/11/40"), what I need is "11/11/1940". >:i.e. >:if year beween 00 and 10, put 20 before it. >:Otherwise put 19 before it. >: >:We are on online 5. Even if to online 7.2 and set DBCENTURY=C, the problem is >:still there because it is 50/50 split. >: >:Please email yichen@cs.uh.edu >:Thanks >: >:Yi Chen >: > >Nils.Myklebust@idg.no >NM Data AS, P.O.Box 9090 Gronland, N-0133 Oslo, Norway >My opinions are those of my company >The Informix FAQ is at http://www.iiug.org Jason Harris Informix DBA Westpac Banking Corporation NOTE: I add all these address at the bottom of people who spam me Now when their extractors extract my e-mail address they will also end up spamming each other. root@localhost postmaster@localhost wtcjr@ix.netcom.com Shevsky@hotmail.com speech@speechrecognition.com SmartBiz@NevWest.com slender@juice4u.net sbliss@earthfriends.com ron@moneyaction.com removeme@gwh.net rocco@lostvegas.com market@DRAWBRIDGE.NET Foxyrusski@mail-response.com emaster@email-man.com waynesmail@earthlink.net FreeWay5@dm1.com new.zealand@xtra.co.nz sports@compuserve.com 18626588@10354.com 56372125@15132.com infinity@savoynet.com info@webavenues.com