home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.databases.oracle      Overblown overpriced overengineered SHIT      2,288 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 678 of 2,288   
   Jasper Scholten to All   
   Re: ORA-01840: input value not long enou   
   16 Nov 03 08:58:09   
   
   From: jasc27054@NO-SPAM.yahoo.co.uk   
      
   Tim,   
      
   If you write select statements as you did here, you will get into trouble   
   with your code in the near future.   
      
   Anyway, try:   
      
   SELECT *   
   FROM    tiger.view_tnw_mainstream   
   WHERE trunc(due_date-5) = trunc(sysdate)   
      
   It is expected that column DUE_DATE is a date column.   
      
   HTH,   
      
   --   
   Jasper Scholten   
   DBA / Application Manager / Systems Engineer   
      
      
   "ck388"  schreef in bericht   
   news:698a71bb.0311151753.219432b1@posting.google.com...   
   > I'm trying to perform a select query on an oracle database but I get   
   > this error.   
   >   
   > ORA-01840: input value not long enough for date format   
   >   
   > My query is:   
   >   
   > SELECT * FROM TIGER.VIEW_TNW_MAINSTREAM WHERE   
   > TO_CHAR(SYSDATE,'yyyy/mm/dd') =   
   > TO_CHAR(TO_DATE(DUE_DATE,'yyyy/mm/dd')-5,'yyyy/mm/dd')   
   >   
   > Does anyone know what's wrong?   
   >   
   > When I do:   
   >   
   > SELECT TO_CHAR(SYSDATE,'yyyy/mm/dd') FROM TIGER.VIEW_TNW_MAINSTREAM   
   >   
   > and   
   >   
   > SELECT TO_CHAR(TO_DATE(DUE_DATE,'yyyy/mm/dd')-5,'yyyy/mm/dd') FROM   
   > TIGER.VIEW_TNW_MAINSTREAM   
   >   
   > i get no errors.   
   >   
   > Would it be the fact that I have NULL values in the DUE_DATE field?   
   >   
   > Thanks in advance for any help.   
   >   
   > Tim :-)   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca