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?
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?