Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Informix SQL question

Status
Not open for further replies.

mdtimo

Programmer
Oct 18, 2001
38
US
This isn't exactly related to Crystal but I am writing a stored program for Crystal and wanted to see if anyone had an idea of what I am doing wrong.

The three tables involved are charge,charge_udf, and sales, I want a list of the distinct udf values from these two fields but with nulls I get the null value repeated if there is a null present in the cost and time udf.

charge and charge udf join on the index.

charge
index amount
1 $50.00
2 $25.00

charge_udf
index udf
2 Overpriced


Sales
index amount udf
1 $30 Underpriced
2 $25 <null>

select * from sales
into temp tempudf
insert into tempudf(select distinc(udf) from charge, outer(charge_udf) where charge_udf.index=charge.index)

I get the output as follows with select * from tempudf
<null>
<null>
Underpriced
Overpriced

I want only one null value but can't seem to get just ONE!

Any ideas?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top