Re: a how can I do this in Informix question



Because we have users that can use any tool to connect via ODBC and it is not alwys possible to set DBDATE this way. And yes they are lazy. They want to learn as less as possible. Surely not the different date formats of Oracle, Informix, Teradata and MS SQLserver, which we all have.

Obnoxio The Clown wrote:

Hello,

I have a problem in Informix that I need to solve.

I have table

Table ABC
{
Field1   integer,
Field2   char(5),
Insdate   integer
}

What I want now is when an insert occurs on this table on the fields
(Field1 and Field2) that afterwards the fields Insdate is filled

with

the date of today but stored as a number in the format YYYYMMDD.


Why? Why not just keep the fricking date?


Example:

Insert into ABC (Field1, Field2)
values (1, "Wim");

then should the query

Select * from ABC;

return:

Field1      Field2      Insdate
1      Wim      20051027

My collegue found how to do it in Oracle and now I want to prove it

also

can be done in Informix. I hope. Else me and my big mouth :-)

So help me please.

Thanks,

Wim

sending to informix-list

sending to informix-list




.



Relevant Pages

  • Re: How to find Minimum of four fields
    ... SELECT Id, Field1, Field2, "PhoneCost" AS CostType, PhoneCost AS CostAmount ...
    (microsoft.public.access.gettingstarted)
  • Re: How to find Minimum of four fields
    ... Let's assume you currently have a table with Id, Field1, Field2, WebCost, ... PhoneCost, StoreCost, and ShowCost. ...
    (microsoft.public.access.gettingstarted)
  • Re: Copying a Field
    ... Since Field1 has no value on a new record, niether will Field2. ... > field is the primary key and a second field will for the some of the time ... > Debbie D. ...
    (microsoft.public.access.forms)
  • Re: 30 tables I need the Same 5 fields from wach of them!!!
    ... You need a union query ... ... UNION SELECT Field1, Field2 FROM SecondTable ... GlobalSign digital certificate is a forgery and should be deleted without ...
    (microsoft.public.access.queries)
  • Re: Sum Fields which have blank records
    ... SELECT Record, Field1 as TheValue ... SELECT Record, Field2 ... You can then create a totals query from the union query that groups by ...
    (microsoft.public.access.reports)