Re: Date Formats
From: Tibor Karaszi (tibor_please.no.email_karaszi_at_hotmail.nomail.com)
Date: 11/25/04
- Next message: Gene Vangampelaere: "first day of quarter - function"
- Previous message: Tibor Karaszi: "Re: Convert join statement"
- In reply to: Bobby: "Date Formats"
- Messages sorted by: [ date ] [ thread ]
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
- Next message: Gene Vangampelaere: "first day of quarter - function"
- Previous message: Tibor Karaszi: "Re: Convert join statement"
- In reply to: Bobby: "Date Formats"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|