Re: Informix SQL ver.2.10 Re
Posted in 1994
Reply to: RE>Informix SQL ver.2.10 Repor
You can set this up in your select statement. For example:
select ba_hear4 u_hearing, ... from tablename where ba_hear4 is not null
union
select ba_hear3, ... from tablename where ba_hear4 is null and ba_hear3 is notnull
union
select ba_hear2, ... from tablename where ba_hear4 is null and ba_hear3 is null
and ba_hear2 is not null
union
select ba_hear1, ... from tablename where ba_hear4 is null ahd ba_hear3 is null
and ba_hear2 is null and ba_hear1 is not null
order by u_hearing
I hope this will help you.
Dave Mascorro
The University of Texas Health Science Center at San Antonio
Medicine/Oncology
dave@oncology.uthscsa.edu
--------------------------------------
Date: 9/14/94 9:57 AM
To: David Mascorro
From: Charlene C.
I would like to write a report and order the information by the outcome
of an if statement.
example:
There are 4 hearing date fields.
In the body of the report program I would say:
if ba_hear4 is not null then
let u_hearing = ba_hear4
else
if ba_hear4 is null and ba_hear3 is not null then
let u_hearing = ba_hear3
else
if ba_hear3 is null and ba_hear2 is not null then
let u_hearing = ba_hear2
else
if ba_hear2 is null and ba_hear1 is not null then
let u_hearing = ba_hear1
NOW:
I want to order the report by
u_hearing
Any ideas?