Re: Dev2K -- Time field question

From: mjc <cavett_at_globalnet.co.uk>
Date: 1997/04/10
Message-ID: <01bc4607$9dc3c6e0$c7567ec2_at_cavett.globalnet.co.uk>#1/1


Hi Ashok -

It's difficult to answer this without further information, for example:

  1. If your table 'table_name' ever has more than one row in it then this statement will raise the predefined error 'TOO_MANY_ROWS' if that select statement is in procedural PL/SQL code - can you specify where this select statement is called and if you are using any error trapping.
  2. Your query has no predicates (WHERE clause) - perhaps the row returned has zero values for the hrs/mins in the row populating your field.

I'd take a wild guess given what is given and presume that error trapping is being used that leaves hr_field and min_field values in undefined states (is WHENEVER OTHERS THEN NULL appearing in the code at some point?) so the database populates the field with zeros.

Can you give more information please, including the field type being populated, the datatype being populated, the column types of the source data, where the SQL quoted is being called from, any error trapping routines being employed, then perhaps I can help.

Try my work email as you'll get a quicker response.

Regards

  • Martyn Cavett Senior ORACLE Analyst LGT Asset Management London, UK. home: cavett_at_globalnet.co.uk work: Martyn.Cavett_at_gtplc.com

These views are my own and not those of my employer. Normal conditions apply.

Ashok Kapur <afkapur_at_ccgate.hac.com> wrote in article <334BE060.3F89_at_ccgate.hac.com>...
> I have a form containing a date field with the format HH24:MI:SS. I am
> populating this field with data from another table using the following
> type of query:
> SELECT TO_DATE(TO_CHAR(hr_field)||':'||TO_CHAR(min_field),'HH24:MI')
> INTO field
> FROM table_name;
>
> The problem is that the field is always gettin populated with 00:00:00.
>
> Does anyone have a solution?
>
> --
> Ashok F. Kapur | Galaxy Latin America |
> Project Engineer | (954)958-3373 |
> afkapur_at_ccgate.hac.com
>
Received on Thu Apr 10 1997 - 00:00:00 CEST

Original text of this message