× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



All,

 
     I'm going crazy with this SQL stmt - when run I get a 'Token ) was not valid. Valid tokens: + -" (after digits) message in the joblog.  For the life of me, I don't see the problem.  Is there an easier or more intuitive way of debugging embedded SQL?
  'SELECT T4.trmifl, TIMESTAMP(T1.ISIHDATE,  '+ 
 'CAST(SUBSTR(DIGITS(T1.IHTIME),1,2)|| ''.'''+ 
 '|| SUBSTR(DIGITS(T1.IHTIME),3,2) AS TIME) '+ 
 ' ), T1.ISIHDATE,  CAST( SUBSTR(DIGITS     '+ 
 '(T1.IHTIME),1,2) || ''.'' ||              '+ 
 'SUBSTR(DIGITS(T1.IHTIME),3,2) AS TIME ),  '+ 
 'T1.IHTIME, T3.IOSEQ,  T2.IDACODE,         '+ 
 'T2.IDAVALU, T1.IHNOTE, T4.TRMIRS,         '+ 
 ' T2.IDACOMM,  T1.IHRECB, T4.TRRNAME,      '+ 
 ' T4.TRMIDT, T4.TRMITM,                    '+ 
 '  TIMESTAMP(T1.ISIHDATE, CAST(            '+ 
 '  SUBSTR(DIGITS(T1.IHTIME),1,2) ||        '+ 
 '  ''.'' || SUBSTR(DIGITS(T1.IHTIME)       '+ 
 ' ,3,2) AS TIME ) ),                       '+ 
 'TIMESTAMP(T4.ISTRTRDT , CAST(SUBSTR(      '+ 
 'DIGITS(T4.TRTRTM),1,2) ||''.''|| SUBSTR(  '+ 
 'DIGITS(T4.TRTRTM),3,2) ||''.''||          '+ 
 'TIMESTAMP(T2.IDASYSDT , CAST( SUBSTR(     '+ 
 'DIGITS(T2.IDASYSTM),1,2))||''.''|| SUBSTR('+ 
 'DIGITS(T2.IDASYSTM),3,2))||''.''||        '+
 'SUBSTR(DIGITS(T2.IDASYSTM),5,2) AS TIME)),'+
 ' T2.IDASYSDT, CAST(SUBSTR(DIGITS          '+
 '(T2.IDASYSTM),1,2)                        '+
 '||''.''|| SUBSTR(DIGITS(T2.IDASYSTM),3,2) '+
 '||''.''|| SUBSTR(DIGITS(T2.IDASYSTM),5,2) '+
 'AS TIME ) ,                               '+
 '  TIMESTAMP(T4.TRMIDT, T4.TRMITM )        '+
 '  FROM SQAFC312.NCPIOHP T1 INNER JOIN     '+
 '   NCPIODPA T2 ON
T1.IHPAT = T2.IDAPAT AND'+
 '       T1.ISIHDATE = T2.IDADATE AND       '+
 '        T1.IHTIME = T2.IDATIME            '+
 '    INNER JOIN NCIOMSP T3 On              '+
 '     T2.IDACODE = T3.IOCODE               '+
 '         INNER JOIN SQAFC312.NCTRNSP T4 ON'+
 '           T1.IHPAT = T4.TRPAT#  and      '+
 '           T1.ISIHDATE = T4.ISTRACDT AND 
'+
 '           T1.IHTIME = T4.TRACTM AND      '+
 '           T4.TRCODE = ''I''              '
 
As always, thanks for your advice and help.
 
Warmest Regards,

Richard Reeve

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.