You can do if Timetxt is a time data type:

SELECT TimeTXT, ('00:' + (ctxt(TimeTXT)))
    FROM INDIVIDUAL_RESULTS 
   WHERE SeasonCCYY=2008 
     AND MeetNUM <> 3 
     AND TimeTXT LIKE '??:??'


Dan Goldberg

-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Wills, Steve
Sent: Wednesday, September 24, 2008 9:37 AM
To: RBASE-L Mailing List
Subject: [RBASE-L] - Interesting Problem Trying to (Text + Text),
Interpreted as (Time + Text) ...

Maybe not so interesting, but at least curious, a little anomaly in RB or my
brain.

I have a table with a field, `TimeTXT` TEXT (18), which holds text-values
for elapsed time, in the form 'MM:SS'.  I have just received a set of data
to import that also has the 'HH:' components.  So, I figured I'd just add
the 'HH:' to the other strings, to make 'em all uniform.  In each and every
instance, the actual value of 'HH:' is '00:'.  

Should be easy, right?

So, I tried this - don't worry about the meaning of the WHERE-clause:

R>SELECT TimeTXT, ('00:' + TimeTXT)
    FROM INDIVIDUAL_RESULTS 
   WHERE SeasonCCYY=2008 
     AND MeetNUM <> 3 
     AND TimeTXT LIKE '??:??'


Whereupon I received this error message:

-ERROR- TIME cannot be added to TEXT. (2151)


It seems that one of my 2 operands is being interpreted as a TIME type.
But how?  And what do I do?


Thanks,
Steve in Memphis




J. Stephen Wills
Program Manager, Research Informatics
Office of the Vice Chancellor for Research University of Tennessee Health
Science Center
62 S. Dunlap, Suite 400
Memphis, TN  38163
Office: 901-448-2389
FAX    : 901-448-7133


Reply via email to