Re: Date Formats

From: Tibor Karaszi (tibor_please.no.email_karaszi_at_hotmail.nomail.com)
Date: 11/25/04


Date: Thu, 25 Nov 2004 13:13:29 +0100

Bobby,

I presume that the problem is that Oracle doesn't interpret the datetime values from SQL server
correctly?

The operation "convert(Datetime, Ship_date,101)" is a dummy operation. A datetime value doesn't have
a format, hence trying to enforce a format for that datatype is meaningless. It is the client that
interprets the datetime value into a character representation (in this case, the OLEDB provider
should be the client application). What you want to do is to convert the datetime values into a
suitable char(n) or varchar(n) datatype so that the format you specified is in the character
representation and OLEBD/Oracle and perform an implicit datatype conversion from a string into
datetime (whatever it is called in Oracle).

-- 
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Bobby" <gadirajuv@hotmail.com> wrote in message
news:2E732F5C-C93E-4754-B760-9D232064FE69@microsoft.com...
> I'm trying to transfer a table of values from SQL Server to Oracle. I've 3
> date fields in the table. When transferring the data, I used
>       Select convert(Datetime, Ship_date,101)  as ShipDate,
>                 convert(Datetime,Last_Tracked_Date,101) as Last_Tracked_date,
>                 convert(Datetime,Actual_Delivery_Date,101) as
> Actual_Delivery_Date
>       from Tablename
>
>
>    But I get an error displaying that the null value cannot be inserted into
> T$LTDT.
>   this field is present in Oracle and corresponds to LastTracked Time.
>   all the records in SQL Server have the value but i am not sure whats wrong.
>   Could someone help me out please??
>  thanks in advance,
>
> -- 
> Bobby


Relevant Pages

  • Re: Date Formats
    ... tables of SQL Server. ... I had problem in exporting these fields into Oracle. ... > I presume that the problem is that Oracle doesn't interpret the datetime values from SQL server ... > a format, hence trying to enforce a format for that datatype is meaningless. ...
    (microsoft.public.sqlserver.programming)
  • Re: IOT, memory and transaction time
    ... easily generate it with DBMS_METADATA.GET_DDL if your verison of Oracle ... were pretty consistent no matter how big the table (this transaction ... FOREIGN KEY (versionNo) REFERENCES T_TRANSACTIONS, ... Oracle provides read consistency and SQL Server ...
    (comp.databases.oracle.misc)
  • Re: Database or store to handle 30 Mb/sec and 40,000 inserts/sec
    ... "Writers block readers and readers block writers in SQLServer. ... getting around this fundamental issue and because of it SQL Server ... admitted they can happen in Oracle, I guess Oracle should never been used ... isolation level but you will always disagree because you follow doctorine ...
    (comp.databases.oracle.server)
  • Re: IOT, memory and transaction time
    ... easily generate it with DBMS_METADATA.GET_DDL if your verison of Oracle ... If it was the update statement that references ... FOREIGN KEY (versionNo) REFERENCES T_TRANSACTIONS, ... There are however differences how both products deal with concurrency; in Oracle readers don't get blocked while this may happen in SQL Server. ...
    (comp.databases.oracle.misc)
  • Re: Import problems on Windows Server
    ... XP is fine, so is Vista, like you I use them day in day out, around 12 hours ... a day myself too - laptops and the desktop i'm writing this on. ... I use SQL Server on XP and Vista for writing and demo'ing stuff, ... those are the same problems in the Oracle world. ...
    (comp.databases.oracle.server)