Re: Date Formats
From: Bobby (gadirajuv_at_hotmail.com)
Date: 12/03/04
- Next message: Marek: "Re: Returning System Date (Without the time)"
- Previous message: David Gugick: "Re: what is wrong with this stored procedure?"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 3 Dec 2004 06:45:03 -0800
All:
thank you very much for the help.
Actually, I could solve the problem in a different way. There were some
inconsistencies of the way multiple date fields were declared in various
tables of SQL Server. When I populated my temp table, I wrote a script to
change them as uniform fields. Also I changed the formats of the fields in
the Oracle too.
Also, I had problem in exporting these fields into Oracle. I am a newbie
to SQL Server. I learnt my mistake: I was not passing the parameters in the
same format with that of the fields that were selected in the 'Select'. The
order of the parameters in the update query was different from that of the
order of the fields that were selected in the Source.
I found this problem and could solve it.
Thanks again.
Bobby
"Tibor Karaszi" wrote:
> 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: Marek: "Re: Returning System Date (Without the time)"
- Previous message: David Gugick: "Re: what is wrong with this stored procedure?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|