Re: null literal in 9.3
Posted in 2005
Michael Wimmer wrote:
> Hi,
>
> I tried to do a select NULL as... for an not existing column in an Union
> select statement.>
> I have a problem with my solution in 9.3 when I try to turn the select
> into a view and work with the view.
>
> Select and create view work (below is a simplified version)
>
> select cast(null as integer) nilcol from informix.systables
> -> works
>
>
> create view niltab(nilcol) as> select cast(null as integer) nilcol from informix.systables
> -> works
>
>
> But the select fails:
>
> select * from niltab> 201: A syntax error has occurred.>
> It works in 9.4 but I would need it in 9.3. Can anybody give me an hint
> or workaround how I can make this work in 9.3?
It works in 9.40.FC6 and 9.30.UC4 for me. Have you tried creating the view
as follows:
CREATE VIEW niltab(nilcol)AS
SELECT NULL::INTEGER
FROM systables
Cheers,
--
Mark.
+----------------------------------------------------------+-----------+
| Mark D. Stock mailto:mdstock@MydasSolutions.com |//////// /|
| |///// / //|
| +-----------------------------------+//// / ///|
| |We value your comments, which have |/// / ////|
| |been recorded and automatically |// / /////|
| |emailed back to us for our records.|/ ////////|
+----------------------+-----------------------------------+-----------+
--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.344 / Virus Database: 267.12.2/138 - Release Date: 17/10/2005
sending to informix-list