RE: How to show Null expression in SQL query ?
Posted in 1998
---------------------- Forwarded by Rafal Furdzik/PaulWeiss on 12/14/98 11:=
21=20
AM ---------------------------
Rafal Furdzik
12/14/98 11:20 AM
To: "Bernstein, Rick" <rbernste@alarismed=2Ecom>
cc: =20
Subject: RE: How to show Null expression in SQL query ? =20
<<1=2E You could create a procedure that returns a NULL value=2E
Is it necessary to create one procedure for each data type=2E It looks tha=
t for=20
the compiler NULL from date is different than NULL from Integer=2E I tried=20=
to use=20
Date(NULL) when integer was expected, but this did not work =2E
<<2=2E Prior to IDS 7=2E3 I used to join with systables where tabid=3D1 and
<< use the site column for a NULL value=2E
I guess there will be the same problem=2E What should be site column name=20=
I=20
should use?
"Bernstein, Rick" <rbernste@alarismed=2Ecom> on 12/11/98 05:07:09 PM
To: Rafal Furdzik/PaulWeiss
cc: =20
Subject: RE: How to show Null expression in SQL query ?
Several options are available:
1=2E You could create a procedure that returns a NULL value=2E
2=2E You could create a table which has 1 row and columns with NULL values=2E
3=2E Prior to IDS 7=2E3 I used to join with systables where tabid=3D1 and
use the site column for a NULL value=2E
-----Original Message-----
From: rfurdzik@paulweiss=2Ecom [mailto:rfurdzik@paulweiss=2Ecom]
Sent: Friday, December 11, 1998 13:57
To: Bernstein, Rick
Cc: informix-list@iiug=2Eorg
Subject: RE: How to show Null expression in SQL query ?
I need to create an union query, so number and type of column must be
the same=2E I want to replace missing columns with NULL's, so client
application will show nothing for those missing columns=2E
"Bernstein, Rick" <rbernste@alarismed=2Ecom> on 12/11/98 04:40:32 PM
To: Rafal Furdzik/PaulWeiss, "!INFORMIX-list (E-mail)"
<informix-list@iiug=2Eorg>
cc:
Subject: RE: How to show Null expression in SQL query ?
With IDS 7=2E3 you can return NULL from a case construct:
SELECT tabid,
CASE WHEN 1=3D1 THEN NULL END AS col1
FROM systables
WHERE tabid =3D 1;
-----Original Message-----
From: rfurdzik@paulweiss=2Ecom [mailto:rfurdzik@paulweiss=2Ecom]
Sent: Friday, December 11, 1998 13:24
To: informix-list@iiug=2Eorg
Subject: How to show Null expression in SQL query ?
Does anybody knows how to show Null expression in SQL query ?=2E I tried
something like this:
"SELECT NULL As col1 FROM=2E=2E=2E " , but it did not work=2E Any idea ?
__________________________________________________
This message is intended only for the use of the
Addressee and may contain information that is
PRIVILEGED and CONFIDENTIAL=2E If you are not the
intended recipient, you are hereby notified that
any dissemination of this communication is
strictly prohibited=2E If you have received this
communication in error, please erase all copies of
the message and its attachments and notify us
immediately=2E Thank You=2E
__________________________________________________
__________________________________________________
This message is intended only for the use of the=20
Addressee and may contain information that is=20
PRIVILEGED and CONFIDENTIAL=2E If you are not the
intended recipient, you are hereby notified that
any dissemination of this communication is
strictly prohibited=2E If you have received this
communication in error, please erase all copies of
the message and its attachments and notify us
immediately=2E Thank You=2E
__________________________________________________