Auto Casting Oracle column to Sql Server 2005 native type
I have a Oracle linked server (10.g) on a Sql server 2005. Trying to import oracle table schema(s) into SQL using
Select * into ttdsls030010
from openQuery(hades,'select * from baan.ttdsls030010 where rownum =1');
This throws an Error converting data type DBTYPE_DBTIMESTAMP to datetime
Is there a way to autocast Oracle type to Sql type ?
p.s: Essentially, although it is possible to cast type in Oracle using to_char() etc. The notion here is that Orac开发者_开发技巧le table schema could change any time i.e adding or deleting columns. If such has happened, I need to refresh local (sql) schemas to correspond to that of Oracle.
It's likely that the failure is down to a date value that isn't supported by the MS SQL Server datetime - as the documentation for the datetime datatype shows, it only handles dates since 1753, whereas the Oracle dbtimestamp goes from about 4700 BC...
精彩评论