NULL datetime value
Posted in 2003
Topics: Versions, Editions & End-of-Life
Someone
here need to generate a null datetime column on a select =
statement (with union).
Something like this (I'm using systables for test only):
select 1, CURRENT from systables where tabid =3D 1
union
select 2, null from systables where tabid =3D 1
Error: 217: Column (null) not found in any table in the query (or SLV =
is undefined).
IDS 7.31.UD1
=20
Jairo Gubler=20
Analista de Sistemas - APC=20
D=CDGITRO TECNOLOGIA=20
E-mail: jairo.gubler@digitro.com.br=20
Fone:(48) 281 7213=20
Fax:(48) 281 7299=20
Site:www.digitro.com.br=20
Were you using IDS 9.x, you could do:
SELECT NULL::DATETIME YEAR TO FRACTION ....
As you are using IDS 7.31, your options are much more difficult. About the
best I could offer would be:
CREATE PROCEDURE null_datetime() RETURNING DATETIME YEAR TO FRACTION(5);RETURN NULL;
END PROCEDURE;
This should be type-convertible to what you need - or you can jigger it
appropriately until it is what you need.
There are advantages to migrating to IDS 9.x. (Tested: IDS 9.40.UC1 on
Solaris 8).
--
Jonathan Leffler (jleffler@us.ibm.com)
STSM, Informix Database Engineering, IBM Data Management
4100 Bohannon Drive, Menlo Park, CA 94025
Tel: +1 650-926-6921 Tie-Line: 630-6921
"I don't suffer from insanity; I enjoy every minute of it!"
|---------+----------------------------->
| | "Jairo Gubler" |
| | <jairo.gubler@digi|
| | tro.com.br> |
| | Sent by: |
| | forum.subscriber@i|
| | iug.org |
| | |
| | |
| | 07/04/2003 05:18 |
| | AM |
| | |
|---------+----------------------------->
>-------------------------------------------------------------------------------
--------------------------------------------------------------|
| |
| To: ids@iiug.org |
| cc: |
| Subject: NULL datetime value [1497] |
| |
>-------------------------------------------------------------------------------
--------------------------------------------------------------|
Someone here need to generate a null datetime column on a select =
statement (with union).
Something like this (I'm using systables for test only):
select 1, CURRENT from systables where tabid =3D 1
union
select 2, null from systables where tabid =3D 1
Error: 217: Column (null) not found in any table in the query (or SLV =
is undefined).
IDS 7.31.UD1
=20
Jairo Gubler=20
Analista de Sistemas - APC=20
D=CDGITRO TECNOLOGIA=20
E-mail: jairo.gubler@digitro.com.br=20
Fone:(48) 281 7213=20
Fax:(48) 281 7299=20
Site:www.digitro.com.br=20