Re: Data Conversion - Informix 5
Posted in 2000
From: "Perry Provost" <perry.provost@compaq.com> > > 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. Grief. It's a pity this isn't in IDS7. Perhaps you could try something like SELECT date || "" {which should turn date into a char} ... Or else you could write a stored procedure. Sorry, my 5 is a bit rusty. ________________________________________________________________________ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com