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 1,997 of 2,288   
   .com to Nerfherder   
   Re: Inner join with where   
   06 Feb 05 20:52:23   
   
   From: mcstockX@Xenquery   
      
   "Nerfherder"  wrote in message   
   news:33gd015g73geljerllut1hmer5uruv05rv@4ax.com...   
   >I have the following SQL statement I need to   
   > add a secondary where clause to   
   >   
   > SELECT name, amount   
   > FROM node, log   
   > WHERE log.name (+) = node.name   
   >   
   > Now I need to add run_date = '31-JAN-05',   
   > I can not just add this statement since when I do   
   > loose columns in the node table since there is   
   > not a 1:1 match between the two tables.   
   >   
   >   
      
   which table is the run_date column in?   
      
   bottom line, you have to include the oracle's outer join syntax in all   
   affected predicates, so, depending on which table RUN_DATE is in, you need   
   to add either   
      
   run_date = to_date('31-JAN-05','dd-mon-rr') (+)   
      
   or   
      
   run_date(+) = to_date('31-JAN-05','dd-mon-rr')   
      
      
   note also that you should never use implicite date conversion -- either use   
   TO_CHAR or the ansi date literal syntax (if using 10g)   
      
   ++ mcs   
      
   --- 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