title: trying to concat a couple of TO_DATE(SUBSTR) to get a combined date of 'dd-mon-yyyy' from strings..?
body: <p>I previously ask about converting strings to dates and formatting them..
  <a href="https://stackoverflow.com/questions/11231161/split-string-based-on-character-position-in-oracle-11g-sql">split string based on character position in ORACLE 11g SQL</a></p>
  
  <p>Here is the solution I have come up with where WKENDING is VARCHAR2 and RYEAR is date
  The WKENDING has data that looks like '523'(mmdd) and RYEAR is '2012'..</p>
  
  <pre><code>UPDATE OB_SEL_LST84_AGG_WKEND  SET WKENDYEAR =  (TO_DATE((TO_DATE(substr(WKENDING,3,2)),'dd')||(TO_DATE(substr(WKENDING,0,1)),'mon')||(TO_DATE(TO_CHAR(RYEAR)),'yyyy')),'dd-mon-yyyy');
  </code></pre>
  
  <p>I am now getting an error 'ORA-00907: missing right parenthesis', I've double checked the parenthesis a couple of times and they look right to me.. any help would be great.. thanks!</p>
  
  <p>UPDATE
  - After looking at the syntax of what I have above I thought that maybe there are too many TO_DATE attempted conversions going on. So, I shortened it to this.. </p>
  
  <pre><code>UPDATE OB_SEL_LST84_AGG_WKEND  SET WKENDYEAR =  (TO_DATE((substr(WKENDING,3,2))||(substr(WKENDING,0,1))||TO_CHAR(RYEAR)),'dd-mon-yyyy');
  </code></pre>
  
  <p>I'm still getting the missing parenthesis error though.. ARGH!</p>