title: How do I convert an Oracle TIMESTAMP data type to SQL Server DATETIME2 data type while connected via Link Server.?
body: <p>I have tried some examples but so far not working.
  I have a <code>Link Server (SQL Server 2014)</code> to an <code>Oracle 12C Database</code>.</p>
  
  <p>The table contain a datatype TIMESTAMP with data like this:</p>
  
  <pre><code>22-MAR-15 04.18.24.144789000 PM
  </code></pre>
  
  <p>When attempting to query this table in SQL Server 2014 via link server I get the following error using this code:</p>
  
  <pre><code>SELECT CAST(OracleTimeStampColumn AS DATETIME2(7)) FROM linkServerTable
  </code></pre>
  
  <p>Error:</p>
  
  <blockquote>
    <p>Msg 7354, Level 16, State 1, Line 8<br>
    The OLE DB provider "OraOLEDB.Oracle" for linked server "MyLinkServer" supplied invalid metadata for column "MyDateColumn". The data type is not supported.</p>
  </blockquote>
  
  <p>While the error is self explanatory, I am not certain how to resolve this.</p>
  
  <p>I need to convert the <code>timestamp</code> to <code>datetime2</code>. Is this possible?</p>