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 779 of 2,288    |
|    Frank to Wayne Baswell    |
|    Re: Pass variable to Oracle Query form C    |
|    10 Dec 03 22:27:22    |
   
   From: fbortel@nescape.net   
      
   Wayne Baswell wrote:   
      
   > I want to pass a date variable to a sql statement from Crystal   
   > Reports. The part of the query accepting the variables looks like:   
   >   
   > "Calendar_Date between To_Date('1-JUN-03','mm/dd/yy') and   
   > To_Date('30-JUN-03','mm/dd/yy')"   
   >   
   > And I'd be wanting to replace the date part of the query with a   
   > user-entered date. As I'm new to Oracle and Crystal, I don't know   
   > where to start. Is there a way to replace the '1-JUN-03' part with a   
   > variable in Oracle, then modify that variable when I'm designing the   
   > report?   
   >   
   > Grabbing all the results and then filtering them in Crystal won't work   
   > as this table is very large. Apologies in advance if this question   
   > has been asked a million times.   
   >   
   > --Wayne   
      
   Your statement will not work - the date format differs too much from   
   the date offered - result will be an ORA-1860 (iirc)   
   '1-JUN-03','dd-mon-yy', or: '7/1/03','mm/dd/yy'   
   --   
   Regards, Frank van Bortel   
      
   --- 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