Subject | Re: [ib-support] How to multiply a time value and a numeric value. |
---|---|
Author | hans@hoogstraat.ca |
Post date | 2001-10-03T23:15:23Z |
select ( cast('05:42' as TIME)
- cast('04:12' as TIME) )/3600 * 2.00 from table
results in 3.00
----------------------------------------------------------
=?iso-8859-9?Q?=C7a=F0atay_Tengiz?= wrote:
- cast('04:12' as TIME) )/3600 * 2.00 from table
results in 3.00
----------------------------------------------------------
=?iso-8859-9?Q?=C7a=F0atay_Tengiz?= wrote:
>
> Hi to all,
>
> In my table I'm trying to calculate the cost of a person by multiplying
> person's hour rate by working time.
>
> So I got a hourly rate value a numeric field and working time a time field.
>
> When I try to multiply these I get an error.
>
> I am doing this in a trigger. And my trigger looks like :
>
> ALTER TRIGGER SURE_YAZ_INS
> BEFORE INSERT
> POSITION 0
> AS
> declare variable tutar double precision;
> BEGIN
> select percost from personel where kod = new.kod_per into :tutar;
> new.cost = :tutar * cast(new.sure as numeric(18, 3));
> END
>
> thanks
>
> best regards
>
> ~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-
> Cagatay Tengiz
> cagatay.tengiz@...
>
> Tengiz Engineering & Consultancy
> www.tengiz.net
>
> Phone : +90 232 388 07 01
> Fax : +90 232 373 42 63
>
> Kazim Karabekir Cad. No:47/B 35040
> Bornova - Izmir / TURKEY
> ~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-
>
> _________________________________________________________
>
> Do You Yahoo!?
>
> Get your free @... address at http://mail.yahoo.com
>
>
> To unsubscribe from this group, send an email to:
> ib-support-unsubscribe@egroups.com
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/