Re: Is the selection possible?
Posted in 1997
My knee-jerk reaction is is to recommend using a stored procedure for
this query. As far as I know (and I AM a bit behind in this) Informix's
SQL does not recognize statements like:
select a, b, c, d
from some_table
where x is null
OR
select a, b, 44 c, d
from some_table
where x is not null
If someone knows otherwise, please inform us all.
Yan Liu wrote:
>
> We have 3 tables, T1, T2, T3.
> T1 has fields a, b1.
> T2 has fields a, b2.
> T3 has fields a, b3.
>
> If b2 is not NULL, I need select T1.a, T2.b2 into $a, $b
> from T1, T2
> where T1.a=T2.a
> ORDER by T2.b2
>
> Otherwise , I need select T1.a, T3.b3 into $a, $b
> from T1, T3
> where T1.a=T3.a
> ORDER by T3.b3
>
> Is there any way I can do ONE query and get $a and $b?
> --
> Yan Liu
> Anesthesia Computer Service at Emory University Hospital, Atlanta, GA
^^^^^^^^^^^^^^^^^^^^^^^^^^^?
Well, if your computers are sluggish, at least we know what to blame it
on. ;-)
--
-- Jake (In pursuit of undomesticated aquatic avians)
+---------------------------------------------------------------+
|Insofar as manifestations of functional deficiencies are agreed|
|by any and all concerned parties to be imperceivable, and are |
|so stipulated, it is incumbent upon said heretofore mentioned |
|parties to exercise the deferment of otherwise pertinent |
|maintenance procedures. |
+------------------- A Legal Minded Engineer (hardyharhar.com) -+