SQL
Posted in 1992
>>>To: informix-news-gate@rmy >>>Subject: informix sql report >>>Path: emory!wupost!cs.utexas.edu!uunet!infonode!ingr!nijmeg!swindon!sys2!susan >>>From: susan@sys2.uucp (Susan Court) >>>Organization: Intergraph >>> >>> >>>The select statement I use is as follows: >>> >>>select >>> project.p_code, p_status, c_code, p_value, p_desc, >>> p_purpose, p_seats, r_name1, r_name2, >>> a_date, a_code, a_desc, >>> swpart.s_partno, s_name, s_desc, s_usage, >>> h_desc, h_qty >>>from project, outer p_activity, outer (p_swpart, swpart), outer p_hwpart >>>where project.p_code matches $my_proj >>> and p_activity.p_code = project.p_code >>> and p_swpart.p_code = project.p_code >>> and swpart.s_partno = p_swpart.s_partno >>> and p_hwpart.p_code = project.p_code >>>order by p_code, a_date, s_partno, h_desc >>> >>>I go on to use the before group of statements in order to get a report >>>which should look as below:.... >>> >>> >>> >>>Instead of this report I am not getting the information ... >>> Susan Court (Systems). The problem may not be in the SQL statement but in the report... But you probably have already tried this... select project.p_code, p_status, c_code, p_value, p_desc, p_purpose, p_seats, r_name1, r_name2, a_date, a_code, a_desc, swpart.s_partno, s_name, s_desc, s_usage, h_desc, h_qty from project, outer p_activity, outer (p_swpart, swpart), p_hwpart where project.p_code matches $my_proj and p_activity.p_code = project.p_code and p_hwpart.p_code = project.p_code and (p_swpart.p_code = project.p_code and swpart.s_partno = p_swpart.s_partno) order by p_code, a_date, s_partno, h_desc Have not done a lot of outer joins but we would do this as shown instead of the way you have done it, then done our report printing in after group statements instead of on every row. This may not every be close...but offering my comments... Cheryl Gross (903) 334-3518 Red River Army Depot