title: JPA Native Query
body: <p>I am trying to execute a native query and pass run-time parameters and get the result as a List. When I try to process the Object [], one of the columns fetched is a String. But it comes out as java.lang.Character instead of String. Here is the query below:</p>
  
  <pre><code>SELECT CASE
           WHEN (TRUNC(abm.credit_card_expiration_date) BETWEEN trunc(SYSDATE) AND
                trunc(last_day(SYSDATE))) THEN
            'Expires'
           ELSE
            'Expired'
         END EXP_STATUS,
         TO_CHAR(abm.credit_card_expiration_date, 'MM/YY') EXP_DATE
    FROM account_billing_methods abm
   WHERE abm.account_id = 201103
     AND abm.billing_type_id = 1
     AND TRUNC(abm.credit_card_expiration_date) &lt;= TRUNC(LAST_DAY(SYSDATE))
  </code></pre>
  
  <p>The EXP_STATUS column could not be typecasted into String as it is of type Character. Any ideas of why it does not work?</p>
  
  <p>Regards,
  -Anand</p>