Data Conversion - Informix 5
Posted in 2000
From: "Perry Provost" <perry.provost@compaq.com>
Subject: Re: Data Conversion - Informix 5
Date: Tuesday, April 25, 2000 1:25 PM
Actually I'm working on a Crystal Report which requires connecting two
different databases. For the DATE -> VARCHAR conversion, I want to perform a
join between a field in an Informix 5 database with a field in a MS SQL
Server 6.5 database. The field in Informix is stored as a DATE datatype. The
field in MS SQL is stored as a DATETIME datatype. MS SQL doesn't have a DATE
datatype. I don't want to convert the Informix field to DATETIME datatype as
I am only interested in the date portion of the field value.
Since both databases support the VARCHAR datatype, I want to convert the
Informix field from DATE -> VARCHAR and the MS SQL field from DATETIME ->
VARCHAR (Stripping off the time, of course).
BTW, I need the Informix conversion to take place in a view as the
existing data is in a critical production system and cannot be modified.
Any ideas?
"Obnoxio The Clown" <obnoxio@hotmail.com> wrote in message
news:8e4b7d$krv$1@news.xmission.com...
>
> From: "Obnoxio The Clown" <obnoxio@hotmail.com>
> >
> >From: "Perry Provost" <perry.provost@compaq.com>
> >> Could anyone tell me the correct SQL syntax in Informix 5 to
convert
> >>between the following
> >> datatypes :
> >>
> >> date -> varchar
> >> number -> char
> >
> >Informix will do an implicit type conversion, so you could just
> >
> >insert into newtable
> >select ....
> >from oldtable>
> I forgot to ask, why would you want to do this?
>
> ________________________________________________________________________
> Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com
>